This functionality allows you to prepare a document for printing or exporting data to a pdf or docx file. The application provides several types of templates:

  • html - allows you to prepare a template using an html editor.
  • html_code - only html code is used to prepare the template.
  • docx - you can use a docx file as a template.
  • Label - a template with a specified size.

Creating a Template

Go to the "Templates to export" page and click on the "Create" button.

In the dialog box, select the entity to create the template for and specify the template type.

Please note that you have the option to set the field filters that will display the template button.

After creating a template, click on its name and you will be taken to a page where you will have the opportunity to prepare a document.

You can insert values from the current record into the document body using the special construction {#448:Status}

You can also embed information from a nested or related entity using the {#entity8:0<2,4,5>} constructs. For a detailed description of this functionality, see the Help section.

Output by condition

New feature for version 3.0

Sometimes there is a situation when the content in the template needs to be displayed according to a condition, for example, to display the text depending on the field value. To add a condition to the template, use the following construction:

{{if([208]>0):}}
Some text here...
{{endif}}

Where 208 is the ID of the numeric field. {{endif}} - end of the block with the condition.

Please note: to compare strings, you need to put the string in quotation marks, for example:

{{if([208]==0 or [158]=='Test project 2'):}}
...
{{endif}}

As shown in the example above, several conditions can be set in the if construct using the and and or commands. It is also allowed to use the PHP function. For example, checking the length of the value:

{{if(strlen([160])>0):}} ... {{endif}}

Please note: it is not allowed to use a condition in a block with condition. There are also no branching conditions provided.