I have a customer sending me an xml file to create a utility bill.
In one section there needs to be a table for reading and usage. The problem is some of the service line do not have readings. What I need to do is suppress those lines from printing in the table.
How can I accoplish this?
jchamel
September 16, 2024, 12:12pm
2
Can you share a screenshot of your current datamodel showing the “absence” of reading?
Here is a sample of the tabel in question. If there is no Cr_read I don’t want the line to show.
jchamel
September 16, 2024, 5:51pm
4
In your Template->Outline tab, right-click the <>tr that represent your row. Select Make Conditional…
Setup your condition there.
This comes from a xml repeat extract and I don’t see how to put a condition on the repeating rows. That is what I’m looking to do.
jchamel
September 17, 2024, 8:50pm
6
You have to be on your Design , not Source tab and then you right-click in your Outline tab.
I did that, but when I try to create a conditional scripts the fields in the table aren’t available.
I tried to manually write the script adding the fields in and that didn’t work either.
Sharne
September 18, 2024, 10:55am
8
Script Selector: (Change my table name to yours [your tables ID]. Mine is StatementTable.)
#StatementTable tbody tr
Modify this script to target which column to base the hide on.
results.each(function(index) {
var serviceType;
serviceType = record.tables.Statement[index].fields.ServiceType;
if (serviceType.includes("REVERSE")) {
this.attr("data-conditional", "");
this.hide();
}else{
this.show();
}
});
Regards,
S