Relevance rules determine whether a field is relevant. When a field is not relevant, it is not shown in data entry, and its value is expected to be blank.
Relevance rules are sometimes known in other systems as “skip logic.”
Enabling
Relevance rules can be set for fields in the form designer. First, check “Set relevance rules”. Then you can build the rule using the rule builder or the formula editor.
Behaviour
Data entry
When adding a record, a field with a relevance rule will be hidden whenever the relevance rule evaluates to FALSE
.
When editing a record, if any changes that are made that make a previously relevant field irrelevant, the value of the newly irrelevant field will be set to empty when saving.
Required fields with relevance rules
A field can be both required, and have a relevance rule set. When the field is relevant, a value must be provided. When it is not relevant, it will not be required and must be blank.
Subforms
When a relevance rule is defined for a subform field, ActivityInfo takes extra steps to avoid data loss.
During data entry, if a subform field with existing records becomes irrelvant, the user will be prompted to acknowledge that saving the changes will delete the newly irrelevant subrecords.
Irrelevant subrecords in the table view
If subrecords become irrelevant, because the relevance rule has been updated after the irrelevant data has been collected, then these will be flagged in the table view as irrelevant:
Importing records
When importing records into forms with relevance rules, the importer will validate the import based on the relevance rules defined. If a field value for a record is irrelevant, but a value is provided, it will be considered invalid.