How to Create a Document Template

Purpose

The purpose of this article is to provide a user with the basic information regarding the creation of a document and how to use the preview functionality for an overall view of the document’s final form.

In order to create a document, follow the instructions:

  1. Go to the Document Builder (on the left sidebar)

  2. Press the ADD NEW button or the plus button under the label ‘’All documents’’;

  3. Give it a suggestive name, such as “Expense Report Document” for our use case - lick on the document we have created and changed its name;

  4. Press SET.

When you’re done, it will look like this:

We start to add details in the editor area according to our UI setup. Once we added the fields from the UI, we will also add the elements from the Data Model so that the form will be populated with the information filled in the UI.

The Document editor area is almost identical with a word document where you can write, add tables, images, define formats, etc.

You can add Data Model attributes on the document by using the plus button in the left panel or directly by typing the $ sign on the template and select the attribute. We do this because when the expense is approved, the document will be filled in with dynamic data (the data inserted by the users across the process):

  1. Press the plus button ;

  2. Enter the ‘’Data Model’’ tab and click on a class to expand the list of attributes associated with that class;

  3. Let’s say we want to add the attribute FirstName to the document; on click, the system will add the value to the editor area where you left the cursor;

  4. We shall now see the attribute named FirstName added to our document

Do this for all the data you need to be written inside the document.

Once you’ve added one or multiple attributes inside the document template you can choose the number formatting for each of the attributes simply by clicking on them.

The chosen number format will be applied when generating a document.

If date, time or dateTime attributes are included in the document, the user can choose the language in which the date and time format will be displayed.

This can be done by clicking on the attribute and changing the language from the dropdown.

 

When you finish, save the document using the button from the top right corner.

You can also use the preview functionality (left side, near the trashcan button) in order to make an idea of how the document will look once it’s generated. This is very useful because you can see if the content is misaligned, you can identify typos and comes very handy to correct them while still here.

This is an example of a document preview:

Feel free to use your imagination and customize the document however you want.