FastField comes packed with an extremely powerful and robust form rules engine with the following capabilities:
- Skip logic
- Action alerts
- Conditional workflow
Advanced Rules are form rules, as opposed to field rules. Field rules are rules that trigger action from a single field, while form rules (Advanced Rules) let you create rules that span multiple fields and fire multiple actions in a single rule.
For example, you can create rules that trigger alerts, hide and show other fields, calculate sums of fields, and more based on the conditions you set.
if (IssueFound == true && Severity == 'High')
Instead of writing a script to accomplish this, however, you can set up an Advanced Rule as shown here:
The Advanced Rules screen provides a menu to select from your field list and available functions, requiring limited or no programming experience.
How to Set Up an Advanced Rule
1. Open your form in the Form Builder.
2. Select Advanced Options > Advanced Rules to open up the rule editor. Stay in the Rules tab.
3. You will be presented the Form Rules screen. To add a Rule, click the Add Rule button.
4. Name your rule.
- It's best to give this a logical name so you can easily find your rule in the list of rules you may have later on.
5. Add a Rule Condition.
- Select a field from the Field, Rules, and Variables dropdown list.
- You can add additional conditions by clicking the + button.
6. Select the type of evaluation you are performing.
- The list of operators will change based on the field that you selected.
- In the following example, we chose a Yes/No/NA field, so we have the options Equals, Not Equals and Has Value:
7. Select the value you are comparing your field to.
- In the example below, we are checking if the Was there an issue found? field has a value of Yes:
8. Once you have setup your Rule conditions, define the actions that run if those conditions are met.
- You can add additional actions by clicking the + button.
- In the following example, we are going to Show the Please describe the issue text field if the user taps Yes on the Was there an issue found? field:
- See a list of available actions in the next section.
The following is a list of available actions that can be triggered on an Advanced Rule:
- Show (Else Hide) - Shows a field/section when a condition is met, otherwise hides it
- Show - Shows a field or section
- Hide (Else Show) - Hides a field/section when a condition is met, otherwise shows it
- Hide - Hides a field or section
- Set Color - Green - Sets a field or section's color to Green
- Set Color - Blue - Sets a field or section's color to Blue
- Set Color - Yellow - Sets a field or section's color to Yellow
- Set Color - Red - Sets a field or section's color to Red
- Clear Color - Resets a field or section color
- Disable (Else Enable) - Disables a field or section when a condition is met, otherwise Enables it
- Disable - Disables a field or section
- Enable (Else Disable) - Enables a field or section when a condition is met, otherwise Disables it
- Enable - Enables a field or section when a condition is met
- Required (Else Not Required) - Sets a field or section as required when a condition is met, otherwise sets it to Not Required
- Required - Sets a field or section to Required
- Not Required (Else Required) - Sets a field or section to Not Required when a condition is met, otherwise sets it to Required
- Not Required - Sets a field or section to Not Required
- Add Alert - Adds an Action Alert to the form when the conditions are met
Action Alerts can be leveraged for several purposes. You can think of Action Alerts as notices or tasks that are being triggered by conditions or how a form is completed.
For example, Action Alerts can be used as a summary of issues that were identified in an inspection form.
Action Alerts can also be used to drive specific workflow actions when your form is submitted. In the case of an inspection form, your workflow may Forward a form to a Sr. Inspector if the High Severity Issue alert was triggered during the inspection. The following screenshot illustrates the use of an alert in a Form Rule:
In the Calculations/Variables tab of the Advanced Rules screen, you can perform basic arithmetic directly in your form without the need for a script.
For example, you might want to find the total sum of 3 numeric fields. Written as a calculated script, it would look like this:
var total = 0;
total += float($numeric_field1$);
total += float($numeric_field2$);
total += float($numeric_field3$);
With Advanced Rules, it can be set up using the variable builder screen (Advanced Options > Advanced Rules > Calculations/Variables tab > Add Variable):
In the example above, the variable, Total Issue Count, will automatically sum the 3 fields. Variables can be used in rule conditions and can also be referenced in other variable formulas.