I could use some help to build a simple conditional script to hide the table (and other elements) every time a detail table has no records.
Following conditional script returns “cannot read property ‘length’ from undefined" for these records that have zero detail lines in table3 (and probably this makes sense as no table is defined if there are no records)
No scripting is needed, there is in option in the Attributes panel to achieve this. Select the table element via breadcrumbs bar at the top the editor or via the Outline view and select the “Hide when empty”-option in the Attributes panel.
I don’t get this option, not sure why (see screenshot)
I have this option in the lest page of the insert dynamic table wizard, though.
However (a) it doesn’t hide the headers and (b) I would like to hide the .svg lines too, that you can see above each table on the screenshot.
Hi @Erik,
I just noticed that the hide when empty attribute doesn’t show only when in preview.
Still, it is checked but doesn’t apply to headers and I also need to hide another element along with the table when the table is empty.
I use a way next to your, testing the availlability of the table and not his content. With simple tables (not using PPC wizard classes like table–minimalist) , just like this :