Data Collector Rules

Data Collector Rules enable you to create conditional logic within a Data Collector app. Here’s how it works:

  1. Purpose:
    • Data Collector Rules allow you to dynamically show or hide fields or sections based on the value of another field.
  2. Implementation:
    • Define rules based on field values:
      • For example, if Field A has a specific value, show Field B; otherwise, hide it.
    • These rules enhance the user experience by adapting the app interface dynamically.

To create a rule in a Data Collector app, follow these steps:

  1. Click the “Show Rules” button.
  2. A modal titled “Section & Question Rules” will appear.
  3. You’ll find a blank rule that you can fill out.
  4. For each rule, provide the following details:
    • Rule Type
    • Field Name
    • Operator
    • Data Field Value
    • Sections / Fields to Display
  5. Once you’ve created the necessary rules, click “Confirm”.
  6. Remember to publish the Data Collector app to make the rules available for mobile users.

Adding & Deleting Rules

If you need to add additional rules, select ‘Add’.  If you need to delete a rule, select ‘Delete’.

Rule Order

You can change the order of your rules by selecting the 3 bar icon to the right of the rule and dragging to the required position.

Please note, this has no affect on rules in AppCan XP, this functionality is to allow viewing rules in a logical order.

Data Collector Rule Indicators

Let’s break down the color-coded field and section names in the Data Collector builder after setting rules:

  1. Blue Text:
    • If a field name or section name appears in blue text, it indicates that the field or section is performing an action.
    • For example, “Expense Type” (blue text) might be showing or hiding another field based on a condition.
  2. Red Text:
    • When a field name or section name appears in red text, it signifies that the field or section is the result of an action.
    • In your example, “Enter Mileage” (red text) is the outcome of the action triggered by “Expense Type.”

AppCan Advice:

  • To ensure your rules work as expected:
    • Test the Data Collector app on your mobile device.
    • Confirm that fields are showing or hiding correctly based on the rules.
  • For existing apps:
    • Consider copying the app, applying the rules, and testing the copy before assigning it to users.

After Rule(s) have been set, in the Data Collector builder, the ‘Field Name’ and ‘Section Name’ will change colour to blue or red text:

  • If the field name / section name is in blue text, this indicates the field / section is performing an action.
  • If the field name / section name is in red text, this indicates the field / section is the result of an action.

In the example below, ‘Expense Type’ (blue text) is performing the action of showing ‘Enter Mileage’ if ‘Expense Type’ = ‘Mileage’.  ‘Enter Mileage’ (red text) is the result of the action.

Scroll to Top