This article will help you:
- understand how to use the {{\dr}} and {{\dc}} commands to avoid unpleasant errors
within your tables, i.e. empty rows or columns
In addition to paragraphs, you can also fill tables in a Microsoft Word document with content generated in BRYTER. Edge cases such as empty Input Nodes can be handled by BRYTER so your table will not have empty rows. Understanding this simple functionality will enable you to build tables of content, address lists, or any kind of data table in a Microsoft Word document.
The {{\dr}} statement
'Delete row' {{\dr}} deletes an empty row in a table within a Microsoft Word document. Whether you use optional Input Nodes or if certain Nodes cannot be reached due to the logic of your module, you can add the {{\dr}} statement in your table cell, so an empty row will be deleted. The behavior is similar to the avoidance of empty paragraphs.
The module above has optional Input nodes called 'term heading 2', 'term content 2', 'term heading 3', 'term content 3', 'term heading 4', 'term content 4', 'term heading 5' and 'term content 5' which describe additional definitions in a contract. These terms should be listed in a table. If the user skips these Nodes, you need to add the {{\dr}} to each optional row, so in case of no data, the row will be deleted.
In this example, everything following {{term heading 2}} and {{term content 2}} is empty because the user entered no data for these values. Therefore, the rows have been deleted.
The {{\dc}} statement
'Delete column' {{\dc}} works similarly to 'Delete row' {{\dr}} however applies to columns instead. {{\dc}} deletes an empty column in a table within a Microsoft Word document. You could use {{\dc}} in a module that generates a document containing a table with both required and optional input. In this example, while the Invoice 'Description' and 'Invoice Value' are mandatory fields, 'Timing' is optional. In a module, you could insert an Input Node and ask the user if they wanted to provide optional information on the Timing of Invoices. If the user chose 'no', there would not be a value assigned to 'Timing'. Therefore, the entire column would be deleted.
Keywords: leere Zeile