The @DOCUO.DeleteRowIfZero macro, used in a table cell in Word 365, allows you to indicate whether to delete the entire row when the label(s) it contains result in an empty text string or a zero.
Table macros in Word templates are only available in Docuo Enterprise.
The table definition, for data from the document itself, is marked in Word with a syntax like:
@DOCUO.TABLE{}
Insert here a Word table with labels inside it.
@DOCUO.ENDTABLE{}
For more information on how to use table macros to display information from related documents visit the link:
https://help.r2docuo.com/knowledge-base/guia-macros-de-tabla-en-plantillas-de-word/
For example, in the case of an Offer category (within the Word template) where we have a table that breaks down a group of amount fields where we do not want to display lines with zero amount, we would use the macro as:
@DOCUO.TABLE{}
Concept | Amount |
Consulting | @DOCUO.DeleteRowIfZero(<@Imports:Consulting>) |
Development | @DOCUO.DeleteRowIfZero(<@Imports:Development>) |
Training | @DOCUO.DeleteRowIfZero(<@Imports:Training>) |
Licenses | @DOCUO.DeleteRowIfZero(<@Imports:Licenses>) |
Total | <Amounts:Total> |
@DOCUO.ENDTABLE{}
In this way, if in the document data only Consulting and Development are filled in, our result table in the Word document would have the final aspect:
Concept | Amount |
Consulting | 1.200 € |
Development | 3.000 € |
Total | 4.200 € |