Configure the Router Setup Property

The RouterClosed The Router Setup property provides a way to divide long strings of data into smaller substrings. You can then use those substrings to populate other questions. Setup property enables you to parse and push data from a Text Field, Text Area, File Upload, or Barcode Scanner question to target questions in your form. This topic provides step-by-step instructions to configure the Router Setup property using Index and Regex options.

Supported on the Enterprise tier only:

Essentials
Advanced
Enterprise

Contents

Prerequisites

Limitations

The following Router Setup property limitations apply to repeatable and template-based sections:

  • A source question in a regular section can’t route data to a repeatable or template-based section, except for questions in the footer.
  • A source question in a repeatable section can only route data to target questions within the same repeatable section.
  • A source question in a nested repeatable section can only route data to target questions within the same nested repeatable section.
  • A source question in the footer of a repeatable or template-based section can’t route data to any question in the form.
  • A source question in a template-based section can’t route data to any question in the form.

Steps to configure a Router Setup property

  1. From the Manage Forms menu, navigate to the form you want to configure.

  2. Select Edit Form.

  3. Select or create the question that captures the initial string (the source question). You can choose any of the supported question types:

    • Text Field

    • Text Area

    • File Upload (JSON, XML, and text files)

    • Barcode Scanner

  4. On the Properties tab, switch on the Router Setup.

    Result: The system displays the options to use Index or Regex.

  5. Select the type of routing, either Index or Regex.

    • Use a regular expression (regex) to search for values in a longer string and store them in capture groups (also known as capturing groups).

    • Use index values to identify substrings based on their position in the longer string.

    Info:The topics How regex works and How index values work provide more details about the Router Setup options.

  6. The steps to add an expression and map the results to target questions depend on the type of routing.

    • Index

      1. Select or create the target questions to populate.

      2. Enter the Range Start and Range End values for each target question.

        Shows how to extract answers with Index and select a range to populate target questions

    • Regex

      1. Select Add an Expression.

      2. Enter the Regular Expression.

      3. Select or create the target questions to populate.

      4. Map the capture groups to the target questions.

    Tip:
  7. Select Save.

    Result: The system saves your question and any new questions that you created in step 6.

    Barcode scanner question configured with a router property, routes data to three subsequent questions (Device Identifier, Lot Number, and Serial Number)

    Tip:In this example, the target questions are configured as read-only, which means that users can’t change the routed (pushed) values.

  8. Did you create a new question as part of the Router Setup configuration?

    • If yes, remember to edit the question if you want to change the default settings.

    • If no, remember to save and deploy the form.

Note:Test your form on all device platforms to ensure that the form behaves as expected.