Test DREL Expressions
Data Reference Expression Language (DREL Data Reference Expression Language (DREL) is used to get form data and metadata and add it to a string, such as dates, usernames, or answers to questions in forms.) dynamically references data and metadata from submitted forms. You can use DREL expressions for submitted form and document names when you implement your company’s workflow. We recommend that you test any DREL expressions you want to use to make sure that they return the intended data or metadata. This topic includes detailed steps to test your DREL expressions.
Available on all tiers:
Prerequisites to test DREL expressions
- You must be a TrueContext Admin user or a user with Can Create or Can View 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..
- You must have access to a dispatched or submitted form.
Steps to test DREL expressions
-
Go to
Data & Analytics > Submissions (by Form) > FormName > Continue
or
Forms & Integrations > FormName > Go to submissions
Result: The Web Portal displays the Form Submissions page for the selected form. By default, The Form Submissions page displays form submissions from the last 30 days.
-
Select the reference number of the submitted form you want to use for your tests.
Result: The system opens the Form Submission details page.
-
Select or hover over the arrow next to the reference number, and then select Test DREL.
Result: The system opens the Test DREL window.
-
In the DREL Text field, enter the DREL expression you want to test. You can test the following common DREL expressions:
-
%a[UniqueId]
—Answer to a question with the specified Unique ID A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents.. -
%d
—Date when a user submitted the form. -
%g
—Address where a user submitted the form. -
%r
—Reference Number of the submitted form. -
%t
—Time when a user submitted the form. -
%u
—Name and username of the user who submitted the form.
Info:The topic DREL Quick Reference includes a list of all the DREL expressions you can test.
The following example shows a test of the DREL expressions for date and time.
Note:The Result Text field can be empty in the following situations:- The referenced information is not available in the submitted form. For example, if the device does not have geo location enabled,
%g
returns an empty result. - The system could not find a match to your DREL expression. Check that your DREL expression references an existing object.
-