Can we hide a table along with its header dynamically in a word document if no rows are available for that table??
Discussion posts and replies are publicly visible
I found the easy way to do this was to simply calculate an additional attribute in the XML i.e. tableHasMoreThan1Row which is true or false which allowed me to conditionally show the table or not.
You can use an "if..else" statement to hide or show your table based on an attribute. The structure of the "if..else" statement should be like this:
[#if doc.d.showTable=='true'] show the table [#else] hide the table [/#if].
tried this one but it is giving syntax error, I am trying to compare it with a string value "N/A"
You can't compare string values. It has to be boolean or number.
Hi Dimitris Soulovaris snehalm0001 ,
I have the same requirement and tried to use the If condition in my word document template but the ADT smart service is not compiling the IF condition instead it is just printing the value in the document.
I referred to the syntax from the Freemaker website https://freemarker.apache.org/docs/ref_directive_if.html