Get started with Template Designer
The article gives a brief tutorial about how to create a document template using the Template Designer.
Last updated
Was this helpful?
The article gives a brief tutorial about how to create a document template using the Template Designer.
Last updated
Was this helpful?
Navigate to your Workspace > Apps and click on the gear icon to activate the configuration mode of your apps. Next, click on the gear icon of the app you want to configure. In the Views section you click on Templates to access the Template Designer. Click New Template.
A template contains various sections to detail the purpose and content of the document. The following paragraphs describe each section in details.
Every template needs some general information about its purpose. Those properties are defined in the General section of a template.
Optionally, you can give your query a Key or match code. This property can be helpful in other drop-down or selection menus in your app to quickly access and choose a template. In the list of templates the value of Key is shown in parentheses behind the name of the template.
The name of the template with that it is represented.
Provide fellow users a description of the template to explain what the template is designed for.
A template is valid for one class. Choose for which one.
A template can be applied on a class, which means on all instances at once or on one instance only.
To create an individualized template, the Template Designer allows users to specify scripts that create and enable the template execution. For more information on how to work with scripts on TIVITY see the documentation for the Script Designer.
In the Script for the template the variable that are replacing the placeholders in the document must be defined. Therefore, they must be named and spelled exactly the same way. Within this script, it must be defined how these data fields are filed.
For example, which data is used for the variables. As explained in the documentation on the Script Designer, different data inputs can be used and expressions for calculating and evaluating variables can be defined. This way a sophisticated report or form letter can be created.
A template can be classified based on the following three types: Internal Document, External Document, or External Placeholder.
Create a document as template within the TIVITY platform by using a Script.
Internal Documents are created within the TIVITY platform. Use this type if only a script is used to return the needed Information. You don’t need to upload a document with placeholder instead create a script and the return of the script will automatically convert to a PDF.
Upload a Word document as template. Therefore add placeholders in this document, so the designer can fill them out with data entries from the platform.
External Documents are Word documents that can be created outside of the platform and then be uploaded in the Template Designer. When the Template Designer is executed, it then automatically checks the document for placeholders and replaces them with the related data in the platform. Then, a new Word document is created with the new data inside.
Upload a PDF document with form fields and fill this fields with values from an Instance. Using a script to match PDF form fields with internal fields.
To enable the inheritance of templates, a parent template can be chosen among the existing templates within the app.
Inheritance is not available for External Placeholder templates.
Add Parameters that will requested when the Template is used. You can use parameters to hand over variables to a workflow/function that is used in the template.
Every template can have assigned specific parameters. These are variables that can be utilized within the template script. Here, different input or output variables for executing the template can be defined.
In the properties of a parameter, various points can be defined. Next to the name and description the variable type can be defined or whether this field is required before execution, its default value and what error message is prompted otherwise.
The available types are described in more detail in Data Modelling under page Field.
The validation automatically checks whether the settings of the template are valid and provides notifications when there are errors.
Finally, click on Validate to verify that your selection of criteria is accepted by the Template Designer. Click on Save to store your template and return back to the list of templates in your app.
Using the globe symbol on the right-hand side allows you to add or modify language-specific values of the property. Click again on the globe symbol to collapse the section.
Using the globe symbol on the right-hand side allows you to add or modify language-specific values of the property. Click again on the globe symbol to collapse the section.
Click on the Upload icon to upload a new external document. To check the document of a template, click on the Download icon to download it.
Use External Placeholder if there is a PDF document with form fields which should be filled with values from an instance. Upload a document with form fields, after that click on Open script icon. The form fields of the PDF documents will be displayed as variables in the script. Inside the script fill these variables with internal values. After that you can use the template and the platform will file the form fields with the values according to the instance and create a PDF document.
Click on the Upload icon to upload a new external placeholder document. To check the placeholder document of a template, click on the Download icon to download it.