
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
- Service region: select the region that hosts the service processing the SQL connection: Europe, North America, Australia, or India.
- Connection method: choose Global connections to select an existing connection set up in FlowForma settings, or Connection details below to enter the connection details directly in this rule. If you choose Connection details below, complete the Server, Database, SQL user name, and Password fields described below.
- Server: enter the location of the server where the SQL database is stored.
- Database: enter the name of the database. This must be a SQL database.
- SQL user name: enter the user name of a user authorised to update tables in the database above.
- Password: enter the password that corresponds to the user name.
- Connection: click Connect to establish a connection to the database. If successful, the stored procedure drop-down is populated.
- Stored procedures: select the stored procedure you want to use. Available after the connection is established.
- Map table data to repeating table: check this to return the result of your stored procedure into a repeating table. The first column coming back from the database is Column 0.
- Input mappings: map fields in the FlowForma form to fields in the database. In the example below, values entered into the six questions on the form are mapped to variables in the selected stored procedure. Depending on how the procedure is designed, these values could create, update, or remove items in the database.
- Output mappings: retrieve information from fields in the database to return values that can be used in fields in the FlowForma form.

- 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.
There must be at least one stored procedure in the database, or the connection will fail.

