Template rules
Use the Rules tab to control whether a field appears in the form, based on the value selected for another field. Rules make forms simpler and faster to fill out in the TerraFlex app because fields that are not relevant to the particular asset are not shown.
For example, let's say your form template includes two fields, named Maintenance required and Work needed. You can create a rule so that the Work needed field appears on the form only if Yes is selected in the Maintenance required field.
For more complex rules, you can select more than one condition field and specify the condition for each field. You can also select more than one target field, to enable or disable any of those fields when the condition or conditions are met.
-
In the Template editor, select the Rules tab.
-
Click the Condition button next to the name of the field that will control whether the target field is shown in the form. The tile for the field you have selected changes from white to green.
-
From the If this field drop-down list, select the condition that the rule will be based on.
-
If you selected any option except Is answered, then select the choice or enter the value required for the condition to be met. For the example above, you would select the Is yes option. For information about the available options for each field type, see Condition options below.
-
Click the Target button next to the name of the field that will be enabled or disabled if the condition is met. The tile for the field you have selected changes from white to blue.
-
From the Target drop-down list select Enable or Disable.
-
Make sure that the text summary for the rule shown to the left of the screen correctly summarizes the rule. If it does not, change the options you have selected until the text matches.
For the example above, the text box would read "If Maintenance required matches Yes then Enable Work needed":
-
To add another target field to the same rule, simply click Target next to the name of the second target field. The tile for the field you have selected changes from white to blue.
For example, you could enable an image field so that an image indicating the extent of the maintenance required can be captured.
-
To save your changes click Save at the top of the screen.
To create another rule, click Create Rule near the top left of the screen.
To delete the rule, click in the rule summary at the top left of the screen.
If you accidentally select the wrong field when creating the rule, click the trash icon or next to the field name. You can then select a different field and continue.
The option Is answered is provided for any type of field. Other options available in the If this field drop-down list depend on the type of field selected.
-
Is yes
-
Is no
-
Exactly matches
-
Is any of
-
Is none of
-
Is equal to
-
Is not equal to
-
Is equal to
-
Is not equal to
-
Is greater than or equal to
-
Is less than or equal to
-
Is greater than
-
Is less than
-
Is equal to
-
Is not equal to