Extensions to Documents

TeamDesk provides support for removing the enclosing paragraph, table row or table when field’s value is empty. You can edit document templates and add the suffixes for removing a paragraph (#dp), table row (#dr) or table (#dt).

These features may help to adjust document layout dynamically based on the presence/absence of some information in a database.

Example 1 -paragraph removing

You created the "Service Form" document template including the "Contact Person" field and "Photo" fields, these fields can comprise empty values, when the Contact Person is not indicated or there are no attached photos.

old-doc-template.png

As a result, the generated document also comprises the empty fields.

old-doc.png

For removing the enclosing paragraph, when field’s value is empty, you have to edit corresponded fields of the document template in the following way:

Put cursor on the field of interest, for example on the "Contact|Person" field.

Click the right mouse button, select the "Edit Field" option in the dropdown menu and the Field form will be displayed.

To remove the paragraph, add the #dp suffix to the field name.

Edit-Field.png

Add the same suffixes to the "Photo" fields.

New-doc-template.png

Save changed document template in and upload it to TeamDesk.

New-doc-generated.png

As a result, if there are no values in the "Contact Person" and "Photo" fields, the corresponding paragraphs are deleted.

Example 2 - table row removing

To remove a table row, add the #dr suffix to the field name.

Remove-empty-row.png

As a result, if there are no values in the "Company" field, the corresponding row will be deleted.

Without-a-Row.png

Example 3 - table removing

To remove a whole table, add the #dt suffix to the field name.

Table-Deletion.png
As a result, if there are no values in the "Invoices/Invoice" field, the whole "Invioces" table will be deleted.

Table-deletion-result.png