How the Router Setup Property Works

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 an example of a Router Setup property configuration and describes how the Index and Regex options work.

Supported on the Enterprise tier only:



Example of the Router Property configuration

The following example describes how you might configure the Router Property for a question that extracts substrings from a UDI barcode.

Your field technicians need to scan UDI barcodes for a variety of medical equipment. They will then carry out required maintenance based on the lot numbers and manufacturing dates.

  1. Add a Barcode Scanner question with the Router Setup property.

    Tip:For the Barcode Scanner question type, choose one or more standards to speed up barcode recognition:
    • UPC (A or E)
    • EAN (8 or 13)
    • Code 39
    • Code 128
    • QR Code
    • ITF

    The system recognizes all barcode types that the scanner can read, including UDI, regardless of which standards you select. Selecting a standard simply speeds up barcode recognition.

  2. Select the Regex option and add a regular expression to parse the barcode data.

  3. Select or add five supported target questions, and map a capture group to each question:

    • Device Identifier

    • Lot Number

    • Serial Number

    • Manufacturing Date

    • Expiration Date

  4. If you don't want your mobile device users to edit the target question values, configure the target questions as Read only.

  5. Save the Barcode Scanner question.

  6. After you save and deploy the form, your mobile users can scan or enter a barcode number and see the target questions automatically populated.

  7. In this example, you want the user to perform maintenance on equipment with specific lot numbers. Use Conditional Logic to set up a new rule that displays work instructions and questions based on the lot numbers.

How regex works

Note:Standard regex syntax applies.

  1. If your initial string is: a1b2c3-d4e-5f6g7

    the regular expression ^.+?-(.+?)-.+?$

    extracts the characters d4e.

  2. You'll typically extract more than one capture group. For example, for the string


    use the following regex to capture the full string plus five different groups:




    to get the following results:


    If the string contains both numbers and letters, you can use the following expression:


  3. Then, you can map the capture groups to the questions in your form, as shown in the following example.

How index values work

If your initial string is: a1b2c3-d4e-5f6g7

the start and end index values 8 and 10

extract the characters d4e

Tip:A start index value with no end value extracts a single character.