Data Record Expression Language (DREL)



The Data Record Expression Language can be used to build a string using properties from the Data Record, including answer data. DREL is most commonly used for:

Any number of references can be combined to create longer custom strings dynamically generated from your data, and they can be combined with static text.  


  • %d - %a[Customer Name] - %a[Priority]  -- Could create a string like: 2014-05-30 - John Doe - Urgent
  • %r[id] - Work Order - %a[Company Name] -- Could create a string like: 1812345 - Work Order - Company ABC
  • %t[HHmm] - %a[Street Address] -- Could create a string like: Store Visit - 14:15 - 123 Avenue Street

A number of variables can be used to insert dynamic data from the Data Record into the string.  These reference properties have a default value, but other properties can specified by using [] syntax following the % reference. For example, using the reference %u would by default insert the user’s display name into the string, but  modifying the reference with the email property ( %u[email] ) would insert the user’s email address instead.

[ top ]


Referencing Form Metadata

A number of data record metadata fields can be referenced with DREL.

Data Record Properties

Reference: %r   |  Default:  referenceNumber  |  Other:  id

  • referencenumber is the Data Record Reference Number, which  is the ProntoForms system's unique identifier for a submitted data record.  It is also shown beside each data record listed in the "Data Records" page in the web portal.  The reference number is composed of a string identifying the date the data record was submitted,  followed by the Data Record Identifier, in the format "yyyyMMD-##########." For example, a data record submitted on June 20, 2014 could have the reference number "20140620-1811278959."  
  • id is the Data Record Identifier (the second part of the Data Record Reference Number).  This number is always unique. 
  • These values can be useful when a unique identifier is required, such as in the case of an invoice number.

[ top ]


Dispatched Metadata

Dispatch metadata is information sent along with a dispatched form that provides extra context for your field users. For more information on dispatch metadata, please read: Dispatch Metadata and Inbox Views

Reference: %m   |  Default: notes  |  Other:  location | priority | duedate

  • notes - Default. This will output the text in the dispatched notes.
  • location - Outputs the latitude and longitude location in the dispatched metadata. It allows multiple expressions: [latitude] and [longitude]
  • priority - Outputs the priority in the dispatched metadata: High, Medium, Low.
  • duedate - Calls the due date metadata. Can be formatted using [date-format] and [timezone], e.g. [HH:MM:SS][America/Vancouver]. For information on date/time formatting, please read the date/time entries below.

[ top ]


FormSpace Properties

Reference: %s  |  Default: name  |  Other:  id

  • The name or id (unique numeric identifier) of the FormSpace the form is in will be referenced.  
  • This can be very useful for teams that have a FormSpace for each region or business function; referencing this in the Folder Expression of a cloud service data destination would allows organizations to sort their forms by FormSpace.
  • Standard Tier teams have one implicit FormSpace called "All Forms."

[ top ]


Form Properties

Reference: %f   |  Default: name  |  Other:  id

  • The name or id (unique numeric identifier) of the form the data was submitted against can be referenced.
  • This is one of the most commonly referenced properties; it is very commonly referenced in Data Record Naming, and in Data Record Document Filename Expressions.

[ top ]


Form Version Properties

Reference: %v   |  Default: version  |  Other:  id

  • The version or id (unique numeric identifier) of the form version the data was submitted against can be referenced.
  • If the form version is v2, the output from %v or %v[version] will be simply "2".

[ top ]


User Properties

Reference: %u   |  Default: displayName  |   Other:  id   |  username  |  name  |  email | alias

  • These properties reference the information of the logged in user who submitted the data record.
  • displayName is the user's name and username, in the format "John Doe ("
  • id is the user's unique numeric identifier in the ProntoForms system.
  • username is the string the user logs in with.
  • name is the user's first name and last name, as configured in their user profile in the ProntoForms web administration portal.
  • email is the user's email address as configured in their user profile in the ProntoForms web administration portal.
  • alias is the user alias set up to interface with an external system. %u[alias] to get all the comma-separated aliases. %u[alias][system] to get a specific alias. For more information on aliases, read: Setting Up User Aliases.

[ top ]



Reference: %d   |  Default: %d[yyyy-MM-dd] 

Typical Date Formatting Syntax:  yyyy (Year)  |  MM (Month)  |   dd (Day)

  • The date property by default references the full date at form completion, collected when the form is submitted.
  • With default formatting, the date would appear like "2014-07-02."  
  • You can optionally configure the format of the date, using the [ ] syntax and additional static formatting.
  • For example, using "%d[E MMMMMMMMM dd, yyyy]" would create a string like "Wed July 02, 2014." 
  • Read here for the full allowed syntax.

[ top ]



Reference: %t   |  Default: %t[HH:mm:ss zz]

Typical Time Formatting Syntax: HH (Hour[24 hour syntax])  |   mm (Minute)  |  ss (Second) | zz (Timezone)

  • The date property by default references the full date at form completion, collected when the form is submitted.
  • With default formatting, the time would appear like "11:57:41" (24 hour time).
  • You can optionally configure the format of the time, using the [ ] syntax  and additional static formatting.
  • For example, using "%t[hh:mm a zz]" will format the date like "11:57 AM EST."
  • Read here for the full allowed syntax.

[ top ]


Referencing Questions and Answers

This section discusses referencing questions and answers in forms that do not contain structured or repeatable sections. Learn more about referencing questions and answers in repeatable sections.

Referencing Question Text

Reference: %q[Unique ID]

This reference is used to insert the text of a question with an ID matching the text in [ ]. Unique IDs are most easily found in the form builder. Learn more about using Unique IDs


Referencing Answers

Reference:  %a[Unique ID] 

This reference is used to insert the answer to a question with an ID matching the text in [ ].  Unique IDs are most easily found in the Form Builder.  Learn more about using Unique IDs. 

For example, the DREL strings required the reference the answers to the questions below would be "%a[SiteLocation]" and "%a[SiteContact]."



Question Comments

Note: This feature is pending release for V2 forms.

Default: %a[Unique ID][Comment]

As documented above, %a[Unique ID] will yield the answer to the question. By default, this is the data included in the question. For example:


Using %a[Unique ID] on this example would yield "7". Using %a[Unique ID][Comment] would yield "gloves, hat, parka".

For more information on Question Comments, please read: Question Comments.

[ top ]


Data Types with Multiple Properties

Some question data types contain multiple properties.  To specify the property to output, use a second [ ] section. For example, to output a file's content type, use %a[FileLabel][contentType]. When no property is specified, the default property is output. To specify fallback properties, use a : to separate the properties. For example: %a[GeoLabel][address:errorMessage].

Geo Location Data Properties

Default: address:coordinates  

Other:  success (successful acquisition indicator) |  geoSource  (acquisition method)  |  timestamp  (time of acquisition) |  coordinates  |  coordinates.latitude  | coordinates.longitude  |   address (resolved address from coordinates) |   errorMessage (reason for acquisition failure)

Note: "Coordinates" contains 3 strings: latitude, longitude, altitude.

[ top ]


Date Data Properties

You can use %a[date question unique ID][property] to filter relevant data from date/time questions. For example, %a[Date][yyyy] will yield only the year from the date question. For more information, see the Date section above.

Default: yyyy-MM-dd    |     Other: yyyy | MM | dd  (see Date section above).

[ top ]


Attachment Data Properties

Default:  filename    |   Other:  contentType |  bytes  (Attachment bytes [Encoded in Base64]) 

[ top ]


Barcode Data Properties

Default: barcodeValue   |    Other:  barcodeType

[ top ]


Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request


  • Avatar
    Huberto Garza

    What is the DREL expression to access location metadata?

  • Avatar
    Jordan White

    Is there an expression for a Users phone number?

  • Avatar
    Erin Longhurst

    Hi Jordan,

    To clarify, are you looking to reference the phone number in their ProntoForms user profile?

    Currently, we do not support pulling the user's phone number with %u, unfortunately. If this is being used in a form, you could export your user list into CSV (Users & Groups > Users > List Users, and select "Export Users to CSV") and use that as a data source to populate answers.

    Please let me know if you have further questions.

    - Erin Longhurst