-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditionally show/hide column value in RecordTable #46
Comments
Hi @DigitalFlow , Could you please give me some advice? Thank you, |
Hi @alexmare93, That should be doable with a renderFunction which contains an if and checks for your column to modify the output. Should look something like this:
Hope that helps. Kind regards, |
Hi @alexmare93, any news? I hope that my snippet should be able to solve your problem. Kind regards, |
Hi @DigitalFlow , I'm sorry but I was on vacation. I will try what you suggest and I'll let you know. Regards, |
Hi @DigitalFlow , I'm a colleague of Alexmare93, we work on the same project. Regards, |
Hi @DigitalFlow , It seems we found the solution: From this: To this: The missing part was the explicitTarget specified for the field/column. Thank you, |
Hi Alessandro, glad to hear that you found the cause :) Yes sure, I'll await your test results. Kind regards, |
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
The text was updated successfully, but these errors were encountered: