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 and Regex options.
Available on the Enterprise tier only:
Contents
Prerequisites
-
You must be an Admin user or a user with Can Create FormSpace permissions FormSpace Permissions control the permissions that a user group has in a particular FormSpace. These are primarily used to control the forms (and the state of form) users can access on their mobile devices. Less commonly, FormSpace permissions give non-admin Users some administrative access to a particular FormSpace without giving them full Admin access to all FormSpaces..
-
Your TrueContext Team must be on the Enterprise tier.
-
You must have a working knowledge of either regular expressions (regex) or index values.
Note:TrueContext Support can help with general questions but cannot help you to write regex.
-
Use the supported question types for source and target questions.
-
Make sure the target questions (the questions you want to populate with substrings) appear after the source question (the question that captures the initial string) in your form.
Tip:If you don’t have target questions set up in your form already, you can create them when you configure the Router Setup property.
Limitations
The following Router Setup property limitations apply to repeatable and template-based sections:
- A source question in a regular section A Regular Section is a set of related questions grouped together for easy reference. The data captured is “non-repeating”. That is, field users enter a single instance of each answer. can’t route data to a repeatable or template-based section, except for questions in the footer.
- A source question in a repeatable section A Repeatable Section is a subform that contains a set of related questions. The data captured is “repeating”, because the field user can complete the same subform more than once, which creates multiple entries. 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
-
From the Forms & Integrations menu, navigate to the form you want to set up.
-
Select Edit Form.
-
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
-
-
On the Properties tab, switch on the Router Setup.
Result: The system displays the options to use Index or Regex.
-
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.
-
-
The steps to add an expression and map the results to target questions depend on the type of routing.
-
Index
-
Select or create the target questions to populate.
-
Enter the Range Start and Range End values for each target question.
-
-
Regex
-
Select Add an Expression.
-
Enter the Regular Expression.
-
Select or create the target questions to populate.
-
Map the capture groups to the target questions.
-
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.
-
-
Select Save.
Result: The system saves your question and any new questions that you created in step 6.
Tip:In this example, the target questions are configured as read-only, which means that users can’t change the routed (pushed) values.
-
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.