Configure the Router Setup Property

The Router 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, Regex, JMESPath, or XPath options.

Available on the Intelligent and Elite tiers:

—Digital
Intelligent
Elite
?

Contents

Prerequisites

Limitations

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

Steps to configure a Router Setup property

  1. From the Forms & Integrations menu, navigate to the form you want to set up.

  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 extraction methods in Extract answers with. File Upload questions offer Index, Regex, JMESPath, and XPath. Other question types offer Index and Regex.

  5. Select the type of routing. For a JSON file in a File Upload question, select JMESPath. For an XML file, select XPath. For text files and other question types, select 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.
    • Use a JMESPath expression to select values from a JSON file in a File Upload question.
    • Use an XPath expression to select values from an XML file in a File Upload question.
    Info:
  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.

        You can add up to 10 expressions per question.

      2. Enter the Regular Expression.

      3. Select or create the target questions to populate.

      4. Map the capture groups to the target questions.

    • JMESPath or XPath (File Upload only)

      1. In Question to populate, select or create a target question.

      2. Enter the JMESPath Expression or XPath Expression that selects the value for that question.

      3. Repeat steps 1 and 2 for each target question.

    Tip:
    • The list of target questions contains subsequent, unmapped questions in your form.

    • To create a new question, just type a new question name and then select the Enter key. The Form Builder creates a new Text Field question using the standard default settings. You can edit this question later, after you save the source question.

  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.