


Title
The first part of the business rule lets you define a title for your rule and select the event on which it operates. The default title is the standard FlowForma rule name; change it by deleting the text and entering your own. In the event field you determine when the rule is executed. For a flow this can occur when the form is loaded, started, or completed. For a step this can occur when the step is started, saved, or completed. For questions it can occur when the question is updated.Rule condition(s)
The second part of the business rule lets you set conditions. These are not required, but if entered they control when the rule is executed in relation to other items in the form.Rule actions
- Document template: contains a drop-down list of all the document templates attached to the current flow.
- To attach a document to a flow, you can either:
- Edit the properties of a document in the “Document Templates” library and select the flow for that template.
- Add and edit a new document template using this rule.
- To add a new document, click the + icon beside the pen as highlighted below. Enter the title of the new document, then click the check icon to create the new template. Then click the pencil icon beside the template name to open the template and edit it. The new template is available to view in Document Templates. Once you’re finished editing, save the document.
- You can also edit existing document templates associated with the flow you’re working on from the Generate Document rule:
- Select the document template from the drop-down menu under rule actions. Click the pencil icon beside the template name to open the template, then edit the text and tokens. Click save to save your edits.
- To attach a document to a flow, you can either:
- SharePoint folder: by default, the newly created document is saved in the form folder in the “Form Documents” library. This field gives you the option to define a different SharePoint folder for saving documents.
Available Tokens
The Available Tokens let you specify a folder structure, including sub-folders, for storing documents. By default the Form Documents library is used, and as documents are generated they’re placed into a sub-folder for each Form Title. However, you may want to create a sub-folder in the Form Documents library for each flow, so that when you open the Form Documents library you see a folder for each flow (provided a document generation rule has executed and created that folder). You can create further sub-folders using, for example, the Step Title token, so that when you open the Form Documents library, open the relevant Flow Title folder, then open the relevant Step Title folder, all documents generated by that step, in that flow, are stored there. A few examples: Subfolder for Flow Title -https://sitename.com/sites/FlowFormaSite/FormDocuments/{FlowTitle}
Subfolder for Step Title - https://sitename.com/sites/FlowFormaSite/FormDocuments/{StepTitle}
Subfolder for both Flow Title, and Step Title - https://sitename.com/sites/FlowFormaSite/FormDocuments/{FlowTitle}/{StepTitle}
- Repeating table: this drop-down list shows all the repeating tables contained in the flow. Select the repeating table you want to use when generating multiple reports.
- Output: you can return the document that was generated for a row by selecting a file upload question in the repeating table and setting it as the output.
- Row Approval Question: you can use a Yes/No question to select which rows should have a document generated.
- Convert to PDF: if this option isn’t checked, the document is created as a Microsoft Word file. If you check this option, the document is created as a PDF.
- PDF security: available when Convert to PDF is checked. Check it to password-protect the generated PDFs with a User password and Owner password and control the Permissions applied (for example Content copying, Modify contents, Fill in, and Printing). This works the same way as in the Generate document rule.
- Attach to step: check this box if you want to access the newly created document directly from the form, without having to go to the SharePoint library where the document was saved. To use this option, you also have to check the “enable attachments” option at the step definition level. A link to the document is included on the form.
- Document suffix: by default, the name of the created document is “form+form ID”. The form ID is a number incremented from 1 from the moment the site was created. If you specify a suffix, it’s added after the form ID, so the document name becomes “form+formID+suffix”.
- Stop execution: if stop execution is enabled and this rule is executed, no other rules are executed.
- Enabled: rules aren’t saved to a list like questions and steps are, so if you want to stop a rule executing without deleting it, toggle this option to enable or disable the rule.
- Enable audit: if checked, a record is added to the audit trail when this rule is executed. This option is available when the Compliance feature pack is activated.
Adding the business rule
Create a document from within the rule
Click the + icon next to the Document template drop-down, and enter the name of the document you want to create.

To edit the document, you need to install the FlowForma Word Plugin on your device.





Select the folder where you want your documents saved


Select the repeating table you want to generate reports for
Open the Repeating table drop-down to display all the repeating table questions available on your flow.
Other options
- Convert to PDF - if you want to convert the Word document to a PDF document, check the box.
- Attach to step - if you want to attach the document in the attachments section at the foot of a step in the form, check this checkbox.
- Document suffix - by default, the name of the created document is .extension. You can add a suffix so the document name becomes .extension.





