Skip to content

Conditionally show/hide column value in RecordTable #46

@alexmare93

Description

@alexmare93

Hi @DigitalFlow,

How can I show/hide a column inside RecordTable based a value of that same fetchXml result?
I put an example:

I have a fetchXml which results 3 records. I have a RecordTable column called "Importo imponibile storno" that, if the field sap_transferline is set = Yes, I have to show the value of field sap_amount, else if field sap_transferline is set = No, always in the column "Importo imponibile storno" I have to show the value of field sap_deltaamount. I need that the column keeps having its label name.
This is currently my recordtable:

${{RecordTable ( Fetch ( "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='sap_creditnoteproposaldetail'><attribute name='sap_creditnoteproposaldetailid'/><attribute name='sap_productdescription'/><attribute name='sap_invoicenumber'/><attribute name='sap_invoicedate'/><attribute name='sap_amount'/><attribute name='sap_deltaamount'/><attribute name='sap_transferline'/><attribute name='ownerid'/><order attribute='sap_name' descending='false'/><filter type='and'><condition attribute='sap_creditnoteproposalid' operator='eq' value='{1}'/></filter></entity></fetch>", Array(Value("regardingobjectid.sap_creditnoteproposalid"))), "sap_creditnoteproposal", [{ name: "sap_invoicenumber", label: "N. Fattura"}, { name: "sap_invoicedate", label: "Data Fattura", renderFunction: (record, column) => DateToString(Value(column, { explicitTarget: record }), { format: "dd/MM/yyyy" }) },{ name: "sap_productdesc", label: "Descrizione Prodotto"},{ name: "sap_amount", label: "Importo imponibile storno", renderFunction: (record, column) => Format(Value(column, {explicitTarget: record}), {format: "{0:0.00}"})}], true)}}

How could I resolve that?

Thank you,
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions