I have a series of detail tables that have paragraphs preceding them as titles. There are times when the data for the detail table does not exist in the data. I am trying to suppress the title from showing when this occurs. i.e.:
Table_Title
DetailTableRow
DetailTableRow
When there is no data for the detail table just the title appears:
Table_Title
I am trying to make it conditional on the detail rows with the script below but I get the message “unknown table”
if (record.tables[“Audi_Comm_Instr”][0].fields[beschreibung5] == “”) {
results.attr(“data-conditional”, “”);
results.hide();
} else {
results.show();
}
When there is no data the table in the scripts pane has a red ‘x’ and shows “unknown Table”. So I tried both of these but still no luck:
if (record.tables[“Audi_Comm_Instr”][0].fields[beschreibung5] == undefined) {
results.attr(“data-conditional”, “”);
results.hide();
} else {
results.show();
}
if (record.tables[“Audi_Comm_Instr”] == undefined) {
results.attr(“data-conditional”, “”);
results.hide();
} else {
results.show();
}
Can anyone help?
Thanks!