Handle complex logic

Prev Next

Overview

FastField's Advanced Rules feature allows you to apply conditional logic using if/then statements (e.g., If a user selects No, then a new field will appear that asks for additional information).  Advanced Rules are useful when you have complex business logic or conditions involving multiple fields. For example, Advanced Rules could be applied to an inspection form that displays specific fields based on the number of rooms being inspected. It could also assign alert colors to those fields based on input.  

How to set up Advanced Rules

  1. Log into the portal and open your form in the Form Builder.

  2. Select Advanced Options > Advanced Rules.

    Advanced Rules menu accessed from Advanced Options in the Form Builder

  3. In the Form Rules window, select + Add Rule to create a new rule.

  4. Select the Fields, Rules and Variables... drop-down list to choose the field you want to apply this rule to.

    • In this example, we've applied it to our How many rooms to inspect? field.

  5. Choose the evaluation type (e.g., Equals, Not Equals, Has Value).

  6. Specify the value you want to compare the field with (e.g., 1).

  7. Under Then perform these actions, define the actions to be performed if the conditions are met.

    • In this example, if the value 1 is selected for How many rooms to inspect?, we will show the Room #1 text field and set its color to green. We will also hide the Room #2 and Room #3 text fields.

  8. Optional: Select + Otherwise to add additional conditions (learn more in the Add additional conditions section).

    Otherwise button used to add additional rule conditions

Add additional conditions

In a similar way, you can add more conditions using the + Otherwise button. Using the same example, for instance, we can create another condition for when users enter 2 instead of 1 when asked How many rooms to inspect? You can add as many conditions as you need.  

  1. Select + Otherwise to create a new action.

    Otherwise button used to create a new rule action

  2. To create a multi-condition rule, select Else If All from the Else drop-down list.

  3. Select + Add Condition.

    Add Condition button in the Else If All rule setup

  4. Set up the new condition.

    • In our example, our new condition is when users enter 2 for the field How many rooms to inspect?

    New rule condition configured for the second scenario

  5. Define the corresponding actions for when the condition is met.

    • In our example, if the user enters 2 for How many rooms to inspect? it will show the Room #1 and Room #2 text fields, set their color to yellow, and hide the Room #3 text field.

    Rule actions configured to show and hide fields for the second scenario You can then repeat these steps to set up as many conditions as needed. To handle cases where no selection is made, use the Else condition.

    • In this example, we use the Else condition to hide and clear colors for Rooms #1, #2, and #3.

    Else condition used to hide and clear colors for all room fields