Skip to main content
To upload a document template, go to Document templates. You can upload an existing Word document or create a new one. When you add a document, make sure you give it a title and select the associated flow, otherwise you won’t be able to use the Generate document business rule to generate the document. To do this, hover over the row, click the three dots, and select Details. Opening a document template's details from the three-dot menu A new panel opens on the right-hand side, allowing you to populate the missing information. The document details panel
  • Title: enter the name by which the document will be referenced in the system.
  • Flow: select the flow you want to associate the document template to. Only one flow can be selected.

Edit document template

To edit a document template, go to Document templates and click the three dots beside the document you want to edit. Select Edit and then click OK. The document opens in edit mode. Opening a document template in edit mode Select FlowForma from the Office ribbon. The FlowForma tab in the Office ribbon In the ribbon you’ll see the following three icons: The Panel, Validate, and External fragment icons
  • Panel: shows a tree view of the flow on the right side of the screen (see image below).
  • Validate: activates after you click Panel; use it to check whether the document is still valid.
  • External fragment: activates when you click an inserted attribute in the document.

The panel

The FlowForma panel is located on the right side of the screen, and the flow elements fall into three categories:
  • Flow level attributes:
    • Completed: the date and time when the flow was completed.
    • Started: the date and time when the form was created.
    • Title: the name of the flow.
  • Step level attributes:
    • Assigned to: the person responsible for completing the step.
    • Title: the name of the step.
    • Description: the text inserted in the step description in the step definition.
    • Comments: the text inserted in the comments field of a step when a form is created and the step submitted.
  • Question level attributes:
    • Question code: the question code from the question definition.
    • Title: the name of the question.
    • Answer: the information entered in the form as an answer to a question (e.g. question: “New employee name”, answer: “Joan Doe”).
    • Description: the text inserted in the description field of the question definition.
The FlowForma panel showing flow, step, and question attributes To include FlowForma panel items (attributes) in the document, place the cursor at the required location in the Word document (this may be on a separate line, in a table, between words in a paragraph, or part of a bulleted list), move to the FlowForma element required, and double-click the item. The item now appears in the document. Continue until all relevant elements have been included. All FlowForma attributes are displayed between square brackets [ ]. FlowForma attributes inserted in the document, shown between square brackets

Repeating table panel details

The repeating table is the only question type that includes sub-questions. If you expand the repeating table question, you’ll see a new line, “SubQuestions”. You can expand this area to see all sub-questions. Each sub-question has the same question attributes as any other question. A repeating table question expanded to show its sub-questions When you double-click or right-click on the answer in a repeating table question, two options appear: Repeating table and Repeating section options Repeating table: the entire table is exported into the document. The heading of each column equals the sub-question title, and the values in each row equal the answers of the sub-questions. In the example below, you can see how the repeating table is displayed in the document template: A repeating table in the document template And how the table is displayed in the final document: The repeating table in the generated document Repeating section: the entire information from the table is inserted as a text box. In the example below, you can see how the information is displayed in the document template: A repeating section in the document template Below is how the information is displayed in the final document. For each row in the table you have a section in the text box, and each section contains all the sub-question titles: The repeating section in the generated document Both table and text box attributes can be added or removed. You can also use Microsoft Word options for styling and page breaks. Adding or removing table and text box attributes

Validate

Use the Validate button to check for any inconsistencies between the document template and the flow. In the example below you can see the warning message. Data from the document that is no longer valid shows up in red, meaning the information has been deleted. The validate warning highlighting invalid data in red

External fragments

External fragments let you dynamically generate documents based on different document templates, by referencing the document template URLs. To include a document fragment in your document template, insert a FlowForma attribute in the document. Click the attribute to activate the External fragment icon in the ribbon, then click the icon. In the window that opens, check the External fragment option and insert the link to the document template you want to use. When you insert the document URL you have two options:
  • If you only use one document, insert the exact name of the document.
  • If you use multiple documents, you can use the {value} token. When you use this token, the document generator automatically picks the answer of the question and maps it to the document template to be inserted in the generated document.
The external fragment options window

Example

In a “new employee” flow, one of the steps is to generate the contract of employment and populate it with the job description of the new employee. The target question “position” has three job titles: Business Analyst, IT Manager, and HR Assistant. The 'position' target question with three job titles In the document templates library there are four document templates:
  • Contract of employment template
  • Business Analyst: contains the business analyst job description
  • IT Manager: contains the IT manager job description
  • HR Assistant: contains the HR assistant job description
The document you generate is the contract of employment. Based on the information selected in the “position” question, the generated document displays the correct information. Note that the document templates must have the same name as the choice values in the question. If you select “Business Analyst” in the flow, the job description from the “Business Analyst” document template appears in the responsibilities area of the newly generated document, as shown below. Generated contract showing the Business Analyst job description If you select “IT Manager” in the flow, the IT Manager job description is displayed. Generated contract showing the IT Manager job description
When you use multiple document templates to generate a document, it’s recommended that you use the same document formatting, otherwise the formatting won’t be consistent, as you can see in the previous two images.