OriginalPostID-261169
Discussion posts and replies are publicly visible
Hi,I have worked on similar requirement to eliminate blank rows in any table in freemarker docx template. Please find example below.
If Field1 & Field2 are empty, the first line will not be displayed as empty line instead Field3,Field4 row gets displayed.
Table1
«[#if doc.mainCdt.subCdt.field1?trim!='' && doc.mainCdt.subCdt.field2?trim!='']»«[#t]»
Field1
«${doc.mainCdt.subCdt.field1}»
Field2
«${doc.mainCdt.subCdt.field2}»
«[#t]»«[/#if]» «[#t]» «[#if doc.mainCdt.subCdt.field3?trim!='' && doc.mainCdt.subCdt.field2?trim!='']»«[#t]»
Field3
«${doc.mainCdt.subCdt.field3}»
Field4
«${doc.mainCdt.subCdt.field4}»
«[#t]»«[/#if]» «[#t]»
Thanks,
KrishnaVeni T