---
title: Full DREL Reference
description: This topic provides detailed descriptions of all the Data Reference Expression Language (DREL) references and properties supported by TrueContext. % [ ] /% /[ /] '%' '[]' "%" "[]
meta_tier: Essentials-Advanced-Enterprise
meta_feature: Approval Workflows,Attachments,DREL,Language Support,Repeatable Sections
source_file: Features/DREL/DRELReference.htm
url: https://docs.truecontext.com/1374411/Content/Features/DREL/DRELReference.htm
last_updated: '2026-04-27'
word_count: 6393
---

# DREL Complete Reference List

This topic provides detailed descriptions of all the Data Reference Expression Language (DREL) references and properties supported by TrueContext.

[Test your DREL expressions](H3DREL/HowToUseDREL/TestDREL.md) to make sure you get the results you expect. DREL expressions can include special characters like spaces, hyphens, symbols, and punctuation.

Available on all tiers:

Digital

Intelligent

Elite

[?](https://truecontext.com/pricing/)

## Form metadata

You can use DREL expressions to reference form metadata. Use form metadata references to return information about the form like

- the Form Submission ID
- the name of the user who submitted the form, and
- the date and time that the form was submitted, among others.

All form metadata references have a default property and at least one alternative property.

### %c - Mobile device information

The mobile device reference returns information about the mobile device from which the user submitted a form.

- Default property: **[displayText]**

  This property returns the device model, model number, operating system, operating system version, and the TrueContext Mobile App version. To display only part of the displayText, use one of the other properties.
- Other properties:

  We’re now TrueContext.

  - To support existing integrations, some items will continue to use “prontoforms” or “pf” in the domain or code.
  - **[os]**: returns the mobile device operating system.
  - **[osVersion]**: returns the mobile device operating system version.
  - **[model]**: returns the mobile device model.
  - **[modelNumber]**: returns the mobile device model number.
  - **[prontoFormsClientSoftware]**: returns the TrueContext Mobile App type.
  - **[prontoFormsClientSoftwareVersion]**: returns the TrueContext Mobile App version.
- Usage examples:
  - `%c` returns **iPhone iPhone 10,4 (iOS 14.4, 12.6.47)**
  - `%c[os] version %c[osVersion]`returns **Android version 14.4.1**
  - `%c[model]` returns **iPhone**
  - `%c[modelNumber]` returns **iPhone 9,4**
  - `%c[prontoFormsClientSoftware]`: returns **iOS**
  - `%c[prontoFormsClientSoftwareVersion]`: returns **v12.4.2.0 (2594)**

### %d - Date of the form submission

The date reference returns the date that a record was:

- Dispatched
- Declined
- Submitted (as complete or incomplete)
- Approved

#### Time zones

The time zones for dates and times depend on the following factors:

- When resolving DREL in output documents, the **Document Time Zone Source** controls the time zone.
- When resolving DREL in Data Destinations or when using the [Test DREL option](H3DREL/HowToUseDREL/TestDREL.md):

  | If the record was | The date resolves to the |
  | --- | --- |
  | Dispatched | Team time zone (if set up) UTC (if the team time zone is not set up) |
  | Declined, submitted, or transferred, and processed on the server | Device time zone |
  | Approved | Device time zone |

If the record requires [approval](../../ApprovalWorkflows/AWLandingPage.md), the **[approval]** property returns the time the record was last approved. The time zone is the device time zone for the user who submitted the record.

You can use additional properties to [override the default time zones](#Time).

#### Date display

You can customize how the system displays the date. For example, you can:

- Change the date format: `%d[dd/MM/yyyy]`
- Display the day of the week, month, or year, or the week of the year, for example: `%d[dd-MM-yyyy w]`
- Display and change the time zone: `%d[dd-MM-yyyy z][TeamTZ]`
- Use a combination of format properties: `%d[dd/MM/yyyy E w z][TeamTZ]`

#### Property details

- Default property: **[yyyy-MM-dd]**
- Date format properties:

  You can change the date format by using a combination of the following symbols:

  | Symbol | Meaning | Format supported | Output Examples |
  | --- | --- | --- | --- |
  | y | Year | [y], [yy], [yyyy] | 2019, 19, 2019 |
  | M | Month | [MM], [MMM], [MMMM] | 09, Sep, September |
  | d | Day in the month | [d], [dd] | 5, 05 |
  | E | Day in the week | [E], [EEEE] | Tue, Tuesday |
  | D | Day in the year | [D] | 258 |
  | w | Week in the year | [w] | 42 |
  | z | Display the time zone | [z], [zzzz] | EDT, Eastern Daylight Time |
- Time zone override properties:

  The default time zone can vary depending on the context. For example, you can set a “default” time zone for a document.

  Use any of the following properties *after* a date format property to display or apply a different time zone.
  - **DataRecordTZ**: Time zone on the user’s device.
  - **TeamTZ**: Time zone configured at the team level.
  - Region/City: A specific time zone. You can use any of the names in the [list of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
- Approval property:

  If the record requires [approval](../../ApprovalWorkflows/AWLandingPage.md), **%d[approval]** returns the date the record was last approved. The time zone is the device time zone for the user who submitted the record.
- Usage examples:
  - `Form submitted %d[dd-MM-yyyy]` returns **Form submitted 25-06-2020**.
  - `%d[EEEE, MMMM d, yyyy]` returns **Thursday, June 25, 2020**.
  - `Week %d[w, yyyy]` returns **Week 26, 2020**.
  - `%d[dd-MM-yyyy z][TeamTZ]` returns **26-06-2020 EDT** when the form was submitted on 25-06-2020 at 11:50 PM PDT, for example.
  - `Approval date: %d[approval][dd-MM-yy]` returns **Approval date: 30‑12‑24** when the record was approved on December 30, 2024.

### %f - Form name

The Form name reference returns information about the form used to submit data.

- Default property: **[name]**

  The form name is one of the most commonly used references when naming folders and document files.
- Other properties:

  **[id]**: returns the unique identifier of the form.
- Usage examples:
  - `%f` returns **Equipment inspection.**
  - `Form %f[id]` returns **Form 145211668**

### %g - Geo location

The Geo location reference returns the GeoStamp collected when a user submits a form.

To use this DREL expression successfully, you must enable the setting to collect a Geo location on your form. The topic [Set Up Form Properties](../../BuildAndManageForms/CreateOrEditAFormWithTheFormBuilder/IntroductionToTheFormBuilder/FormSettings.md#Collect) describes how to configure the Geo location setting.

- Default property: **[address]**

  This property displays the street name and number, city, state or province, postal code, and country.
- Other properties:
  - **[timestamp]**: returns the date and time when the system collected the Geo location. The system displays the timestamp in the GMT/UTC +0 time zone.
  - **[coordinates]**: returns the latitude, longitude, and altitude of the Geo location. Alternatively use **[coordinates.latitude]** **[coordinates.longitude]**, or **[coordinates.altitude]**.
  - **[accuracy]**: returns the accuracy level of the coordinates in meters.
  - **[geoSource]**: returns how the system acquired the Geo location. Systems can acquire a location using GPS, for example.
  - **[success]**: returns **true** if the system collected the Geo location successfully, or **false** if the system failed to collect it.
  - **[errorMessage]**: returns an error message if the system fails to collect the Geo location. If the system collects the location successfully, the system does not return an error message.
  - **[addressDetails][**secondProperty**][**thirdProperty**]**:

    Use this property when you want to retrieve specific information about the address where the user submitted the form.

    When you use this property, you need to include a second property with the following possible values:
    - **[street_number]**: returns the street number.
    - **[route]**: returns the street name.
    - **[locality]**: returns the city name.
    - **[postal_code]**: returns the zip or postal code.
    - **[administrative_area_level_1]**: returns the state or province.
    - **[administrative_area_level_2]**: returns the county.
    - **[country]**: returns the country.

    The third property is optional. You can include the following values:
    - **[longName]**: returns the full value. This is the default, so you don’t need to include it.
    - **[shortName]**: returns an abbreviation of the value. This property only has an effect on the **[route]**, **[administrative_area_level_1]**, and **[country]** second properties.
- Usage examples:
  - `%g` returns **111 Elm Street, Ottawa, ON K1A 2B3, Canada**
  - `%g[timestamp]` returns **2020-01-03T18:34:23.000Z**
  - `%g[coordinates]` returns **41.23443223145432, -23.38029283828193, 123.23874**
  - `%g[accuracy`] returns **14.812454**
  - `%g[geoSource]` returns **GPS**
  - `%g[success]` returns **true**
  - `%g[errorMessage]` returns **Unknown Location**
  - `%g[addressDetails][street_number]` returns **111**
  - `%g[addressDetails][route]` returns **Chestnut Boulevard**
  - `%g[addressDetails][route][shortName]` returns **Chestnut Blvd.**
  - `%g[addressDetails][locality]` returns **Ottawa**
  - `%g[addressDetails][postal_code]` returns **K1A 2B3**
  - `%g[addressDetails][administrative_area_level_1]` returns **Ontario**
  - `%g[addressDetails][administrative_area_level_1][shortName]` returns **ON**
  - `%g[addressDetails][administrative_area_level_2]` returns **Ottawa Division**
  - `%g[addressDetails][country]` returns **Canada**
  - `%g[addressDetails][country][shortName]` returns **CA**

### %m - Dispatch metadata

Dispatch metadata is information that a supervisor adds to a form when dispatching it to give mobile users more context. Dispatch metadata includes

- notes or instructions
- priority
- due date, and
- address.

The topic [Dispatch Metadata and Inbox Views](../../Published/231537608.md) describes Dispatch metadata in more detail.

- Default property: **[notes]**

  This property returns the text in the dispatch notes or instructions.
- Other properties:
  - **[location]**: returns the latitude and longitude of the location in the dispatch metadata. Alternatively use **[latitude]** or **[longitude]**.
  - **[priority]**: returns the priority in the dispatch metadata. Priority can be High, Medium, or Low.
  - **[duedate]**: returns the due date. You can customize the way the system returns dates by using date formats as specified in the [Date](#Date) section.
- Usage examples:
  - `Form priority %m[priority]` returns **Form priority Medium.**
  - `Form due %m[duedate][E, dd-MM-yyy]` returns **Form due Wed, 12-12-2020.**

### %o - Information stored as a response output

The [response output](../../Published/ResponseDataHandling.md) reference returns the information stored after an initial HTTP or Salesforce destination executes. You can use the %o reference in any subsequent destination or its linked document.

The destination that stores the response output must precede the referencing destinations in the Form Builder.

The following Data Destinations can store response outputs:

- [Customer Feedback](../../BuildAndManageForms/DataDestinations/CustomerFeedbackDispatchResponseOutputs.md)
- [Dispatch](../../BuildAndManageForms/DataDestinations/CustomerFeedbackDispatchResponseOutputs.md)
- [HTTP](../../Published/217499958_HTTPPOSTPUTPATCHDataDestination.md)
- [HTTP File Upload](../../Published/217499948_HTTPFileUploadDataDestination.md)
- [Salesforce Account](../../RevisedSalesforceIntegration/10ConfigureStandardCustomorBigObjectDataDestinations.md)
- [Salesforce Case](../../RevisedSalesforceIntegration/10ConfigureStandardCustomorBigObjectDataDestinations.md)
- [Salesforce Contact](../../RevisedSalesforceIntegration/10ConfigureStandardCustomorBigObjectDataDestinations.md)
- [Salesforce Standard, Custom, or Big Object](../../RevisedSalesforceIntegration/10ConfigureStandardCustomorBigObjectDataDestinations.md)
- [Salesforce Lead](../../RevisedSalesforceIntegration/10ConfigureStandardCustomorBigObjectDataDestinations.md)
- [Salesforce Apex REST](../../RevisedSalesforceIntegration/11SetUpSalesforceAPEXRestDestination.md)
- [ServiceNow Table](../../ServiceNow/ServiceNowDataDestination.md)

Response outputs enable you to make sequential requests to third-party systems. This enables you to define relationships between the data or records created in those systems. For example, you can set up a **Salesforce Account** destination to be the parent of a **Salesforce Contact** destination. The Account destination uses [Response Data Handling](../../Published/ResponseDataHandling.md) to store the response output that the Contact destination references. You map the %o expression in the child Contact destination to link new Contact records to the parent Account record:

You can view the parent destination response outputs from the form submission page in the web portal. The topic [View Destination Response Outputs in the Web Portal](../../Published/360029070591_ViewResponseOutputs.md) provides more detail on how to find the response outputs.

- Properties: **[Destination Unique Identifier][key]**

  In the subsequent destination or its linked document, replace the first property with the **Destination Unique Identifier** of the initial destination with the response output.

  Replace the second property with a key returned as part of a key:value pair in the third-party system response body. You can find the key name in the third-party API documentation. The key specifies the stored value in the initial destination’s response output.

  You must include both properties when you create a %o reference. Without these properties, TrueContext can’t retrieve or send data.
- Usage examples:
  - `%o[Account Destination][id]` returns a value of **0014x00000YjZWzAAN**, which is the Salesforce Account record ID.

### %r - Form submission properties

- Default property: **[referenceNumber]**

  The Form Submission Reference Number is the unique identifier for a Form Submission. This number identifies each form submission in the Form Submissions page.

  The reference number has two strings of numbers. The first string is the date the first submission version of the form is created, and the second string is the serverDataRecordID number of the form submission.

  *Example:* A form submitted on June 20, 2019 could have the reference number 20190620-1811278959.
- Other properties:
  - **[id]**: returns the serverDataRecordID. The submitted form serverDataRecordID is the second string in the reference number.
  - **[name]**: returns the name of the form submission. You can't use this property when naming Form Submissions.
  - **[language]**: for [Multi-Language Forms](../LanguageSupport/LandingPages/MultiLanguageFormsOverview.md), returns the language code of the selected or dispatched language. You can use this code in [Data Destination filters](../../Published/217500038_ApplyingFilteringtoDataDestinations.md).
  - **[pfStatus]**: For App‑to‑App callbacks only. Returns the form’s current status on the device as described in the following table.

    | Status | Description |
    | --- | --- |
    | Saved | A TrueContext Mobile App user opened a form from the Forms box or Inbox , and then saved it. |
    | Outbox | A submitted form is still processing on the user’s device and has not yet been uploaded to the server. This can happen when a device is offline, for example. |
    | Sent | A submitted form was uploaded to the server. |
  - **[state]**: returns the state of a Form Submission.

    The **[workflowState]** property replaces the **[state]** property. We previously announced that old metadata fields and values would be supported until September 30, 2025, but the deprecation has been postponed. Integrations, analytics, documents, and scheduled exports using the old fields will keep working until a new end date is announced. Please continue with your migration plans to the new fields and values so you’re ready for future updates.

    The following table describes the states that the server returns, for example, in the case of Form Submission names, document generation, and the configuration of Data Destinations.

    | State | Description |
    | --- | --- |
    | Dispatched | The system dispatched a form to a mobile user. The form is in this state until the user submits, declines, or transfers the form. The term transferred only applies to TrueContext Teamwork -enabled forms . |
    | DispatchDeclined | A mobile user declined a form dispatched to them. |
    | Incomplete | A mobile user transferred an incomplete ProntoForms Teamwork-enabled form. The form is now either unassigned or assigned to another user. A mobile user transferred an incomplete ProntoForms Teamwork-enabled form. The form might be assigned to another user or available for an Admin user to reassign. |
    | Edit | A supervisor sent a completed form for editing. Tested for Natalie, confirmed that Edit is returned currently 2025-04-03 |
    | Complete | A mobile user sent a completed form. The Product server received and processed the completed form. |

    The following table describes the states that the TrueContext Mobile App returns when using App‑to‑App callbacks.

    | State | Description | Visible in Form Names? | Visible in App‑to‑App Callbacks? |
    | --- | --- | --- | --- |
    | Dispatched | The system dispatched a form to a mobile user. The form is in this state until the user makes changes to it. | Yes | No |
    | DispatchDeclined | A mobile user declined a form dispatched to them. | Yes | No |
    | Complete | A mobile user sent a completed form. The submitted form might be in the user’s outbox, or it might have been uploaded to the TrueContext server. | Yes | Yes |
    | Incomplete | A mobile user transferred an incomplete TrueContext Teamwork -enabled form. The form might be unassigned on the TrueContext server or assigned to another user’s Inbox . The form is in this state until a user makes changes to it. | Yes | Yes |
    | Saved | A TrueContext Mobile App user opened a form and made changes to it. The form might be saved in the Drafts or Inbox folder. | Yes | Yes |
  - **[workflowState]**: Returns the state that describes the record’s position in a workflow as a result of the last action taken on that record.

    The **[workflowState]** property replaces the **[state]** property. We previously announced that old metadata fields and values would be supported until September 30, 2025, but the deprecation has been postponed. Integrations, analytics, documents, and scheduled exports using the old fields will keep working until a new end date is announced. Please continue with your migration plans to the new fields and values so you’re ready for future updates.

    For[custom callback parameters](../h3AppToAppForCentral/CustomCallbackParameters/AppToAppCustom_Configure.md), you should continue to use `%r[state]`.

    The following table describes the workflow states the server returns:

    | Workflow State | Description |
    | --- | --- |
    | Dispatched | The record was dispatched to a field technician. The record remains in this state until a field technician submits, declines, or transfers it. |
    | Incomplete | A field technician transferred an incomplete ProntoForms Teamwork-enabled record. The record might be assigned to another technician or available for a technician to claim or a dispatcher to reassign. |
    | Pending Approval | A field technician submitted a record that requires approval. Any user in a group with Can Approve FormSpace permission can claim and review the record. This workflow state is specific to records with an Approval Workflow set up. |
    | Changes Requested | A supervisor has requested changes to the submitted record as part of an Approval Workflow. |
    | Reopened | A supervisor sent a completed record back to a field technician to make corrections. |
    | Completed | A field technician submitted a completed record. This includes records that have been corrected and records approved through an Approval Workflow. |
    | Cancelled | A field technician declined the record after a dispatcher or the system dispatched it to them. |
  - **[dataFlowState]**: Returns the state that describes how data from a dispatched or submitted record moves between the Web Portal and the Mobile App.

    The following table describes the data flow states the Web Portal returns:

    **Pending Download**: The record has been dispatched, reopened, sent for changes in an Approval Workflow, or transferred with TrueContext Teamwork. However, a field technician has not downloaded it. The technician must reconcile their device to download the record or claim it from the **Group Inbox**.

    | Data Flow State | Description |
    | --- | --- |
    | Pending Download | The record has been dispatched, reopened, sent for changes in an Approval Workflow, or transferred with TrueContext Teamwork . However, a field technician has not downloaded it. The technician must reconcile their device to download the record or claim it from the Group Inbox . |
    | Downloaded | A field technician has downloaded the record to their mobile device or claimed the record. |
    | Uploading | The system is uploading a newly submitted or transferred record. The record remains in this state if a field technician ’s device disconnects during the upload. |
    | Upload Failed | The system can’t upload the submitted record. This might be: A server issue. The upload will continue when servers are back online. A connectivity issue on a field technician ’s device. The system will retry the upload when the field technician reconciles the Mobile App . |
    | Uploaded | The system finished uploading a newly submitted or transferred record. |
    | Processing | The system received and is processing the record. |
    | Processing Failed | The system can't process the submitted record due to an error. |
    | Processed | The system processed the record successfully. |
  - **[workflowStatus]**: The Workflow Status is a combination of metadata fields. This “at-a-glance” status makes it easy for work managers to track and manage records. For example, the **Dispatched (Downloaded)** status tells you that a field technician has dispatched work available on their device.

    The **[workflowStatus]** is different from the **[workflowState]**. The **[workflowState]** shows workflow progress, while the **[workflowStatus]** also includes data transfer or processing activity.

    All statuses include a [workflow state](#[workflo), and some also contain the [data flow state](#[dataFlo) or completion result.

    The **workflowStatus** property sometimes returns a value that includes parentheses, such as `Dispatched (Downloaded)`. Make sure to [escape special characters in documents](DRELIntroduction.md#Document) and in [data destination filters](DRELIntroduction.md#Data).

    The following table describes the workflow statuses that the server returns.

    | Workflow Status | Workflow State | Data Flow State | Completion Result |
    | --- | --- | --- | --- |
    | Dispatched (Pending Download) | Dispatched | PendingDownload | None |
    | Dispatched (Downloaded) | Dispatched | Downloaded | None |
    | Dispatched (Uploading) | Dispatched | Uploading | None |
    | Dispatched (Uploaded) | Dispatched | Uploaded | None |
    | Dispatched (Upload Failed) | Dispatched | UploadFailed | None |
    | Dispatched (Processing) | Dispatched | Processing | None |
    | Dispatched (Processing Failed) | Dispatched | ProcessingFailed | None |
    | Reopened (Pending Download) | Reopened | PendingDownload | None |
    | Reopened (Downloaded) | Reopened | Downloaded | None |
    | Reopened (Uploading) | Reopened | Uploading | None |
    | Reopened (Uploaded) | Reopened | Uploaded | None |
    | Reopened (Upload Failed) | Reopened | UploadFailed | None |
    | Reopened (Processing) | Reopened | Processing | None |
    | Reopened | Reopened | Processed | None |
    | Reopened (Processing Failed) | Reopened | ProcessingFailed | None |
    | Completed (Processing) | Completed | Processing | None |
    | Completed (Processed) | Completed | Processed | None |
    | Completed (Processing Failed) | Completed | ProcessingFailed | None |
    | Completed (Processing) | Completed | Processing | Corrected |
    | Completed (Processed) | Completed | Processed | Corrected |
    | Completed (Corrected) | Completed | ProcessingFailed | Corrected |
    | Completed (Approved) | Completed | Processing | Approved |
    | Completed (Approved) | Completed | Processed | Approved |
    | Completed (ProcessingFailed) | Completed | ProcessingFailed | Approved |
    | Incomplete (Uploading) | Incomplete | Uploading | None |
    | Incomplete (Uploaded) | Incomplete | Uploaded | None |
    | Incomplete (Upload Failed) | Incomplete | UploadFailed | None |
    | Incomplete (Processing) | Incomplete | Processing | None |
    | Incomplete | Incomplete | Processed | None |
    | Incomplete (Processing Failed) | Incomplete | ProcessingFailed | None |
    | Pending Approval | PendingApproval | Processed | None |
    | Changes Requested (Pending Download) | ChangesRequested | PendingDownload | None |
    | Changes Requested (Downloaded) | ChangesRequested | Downloaded | None |
  - **[assignment]**: Returns **Assigned** or **Unassigned** to indicate if the record has an assignee.
  - **[completionResult]**: Returns the completion state of the record. This property is specific to forms set up for corrections or an Approval Workflow.
    - If the record requires [approval](../../ApprovalWorkflows/AWLandingPage.md), returns **Approved** or empty to indicate the record approval state.
    - If the record allows corrections, returns **Corrected** or empty to indicate whether a field technician has made changes.
- Usage examples:
  - `Reference number %r` returns **Reference number 20200211-1811522422**.
  - `Record %r[workflowState]` returns **Record Incomplete**.
  - `Approval State: %r[completionResult]` returns **Approval State: Approved**.

### %s - FormSpace name

The FormSpace name reference returns the name of the FormSpace where the form is located. Companies commonly set up FormSpaces to reflect different regions or locations, so returning FormSpace information can be useful to sort Form Submissions.

- Default property: **[name]**
- Other properties:
  - **[id]**: returns the unique identifier of the FormSpace.
- Usage examples:
  - `%s` returns **Toronto team**.
  - `%s[id]` returns **194522112**

### %t - Time of the form submission

The time reference returns the time that a record was:

- Dispatched
- Declined
- Submitted (as complete or incomplete)
- Approved

#### Time zones

The time zones for dates and times depend on the following factors:

- When resolving DREL in output documents, the **Document Time Zone Source** controls the time zone.
- When resolving DREL in Data Destinations or when using the [Test DREL option](H3DREL/HowToUseDREL/TestDREL.md):

  | If the record was | The date resolves to the |
  | --- | --- |
  | Dispatched | Team time zone (if set up) UTC (if the team time zone is not set up) |
  | Declined, submitted, or transferred, and processed on the server | Device time zone |
  | Approved | Device time zone |

If the record requires [approval](../../ApprovalWorkflows/AWLandingPage.md), the **[approval]** property returns the time the record was last approved. The time zone is the device time zone for the user who submitted the record.

You can use additional properties to [override the default time zones](#Time2).

#### Time display

You can customize how the system displays the time. For example, you can:

- Change to a 12-hour clock: `%t[hh:mm:ss]`
- Add AM or PM after the time: `%t[hh:mm:ss a]`
- Display and change the time zone: `%t[hh:mm:ss z][Europe/London]`
- Use a combination of format properties: `%t[hh:mm:ss a z][TeamTZ]`

#### Property details

- Default property: **[HH:mm:ss]**
- Time format properties:

  Change the time format by using a combination of the following symbols.

  | Symbol | Meaning | Format supported | Output Examples |
  | --- | --- | --- | --- |
  | h | Hour in AM/PM (1-12) | [h], [hh] | 4, 04 |
  | H | Hour in a day (0-23) | [H], [HH] | 22 |
  | m | Minute in an hour | [m], [mm] | 15 |
  | s | Second in a minute | [s], [ss] | 39 |
  | a | AM/PM marker | [a] | PM |
  | k | Hour in a day (1-24) | [k], [kk] | 24 |
  | K | Hour in AM/PM (0-11) | [K], [KK] | 0, 00 |
  | z | Display the time zone | [z], [zzzz] | EDT, Eastern Daylight Time |
- Approval property:

  If the record requires [approval](../../ApprovalWorkflows/AWLandingPage.md), **%t[approval]** returns the time the record was last approved. The time zone is the device time zone for the user who submitted the record.
- Time zone override properties:

  The default time zone can vary depending on the context. For example, you can set a “default” time zone for a document.

  Use any of the following properties *after* a time format property to display or apply a different time zone.
  - **DataRecordTZ**: Time zone on the user’s device.
  - **TeamTZ**: Time zone configured at the team level.
  - **Region/City**: A specific time zone. You can use any of the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) names.
- Usage examples:
  - `Form submitted at %t` returns **Form submitted at 12:06:45**.
  - `%t[hh:mm a]` returns **12:06 PM**.
  - `%t[HH:mm:ss z][Europe/London]` returns **20:06:45 BST**. This changes the time zone value.

    You can also use [DataRecordTZ] or [TeamTZ] to change a time zone value, for example: `%t[hh:mm:ss a z][TeamTZ]`
  - `Approval time: %t[approval]` returns **Approval time: 13:35:48** when the record was approved at 1:35 pm in the field user’s time zone.

    The topic [Time Zone Settings](../../Published/217746878.md) describes how and when the system displays different time zones.

### %u - User information

The User reference returns information about the user the form was dispatched to, transferred to, submitted by, assigned to, or approved by.

- Default property: **[submitter][displayName]** or **[assignee][displayName]**.

  The `%u` reference without additional properties returns the submitter, if available. If there’s no submitter, `%u` returns the assignee.

  For example, `%u` applied to a dispatched record returns the assignee. For a TrueContext Teamwork-enabled form, `%u` applied to a transferred form returns the user (submitter) who transferred the form.
- Other properties
  - User types:
    - **[submitter]**: returns the last user to submit, transfer, or decline the record from the Mobile App.
    - **[assignee]**: returns the user currently assigned to the record.
    - **[approver]**: returns the approver when a record is pending approval or approved.
  - Information types:
    - **[id]**: returns the user's unique identifier in the TrueContext system.
    - **[username]**: returns the user's username.
    - **[name]**: returns the user's first and last name.
    - **[email]**: returns the user's email.
    - **[alias]**: returns all of the user's aliases, comma-separated. Go to [Setting Up User Aliases](../../Published/228225648.md) to learn how aliases work.
    - **[alias][system]**: returns the user's alias for a specific system. Returns an empty string if the user has no alias for that system.

  You can combine the user and information types. Always put the user type first: `%u[assignee][email]`, for example.
- Usage examples:
  - `Reply to %u[name] at %u[email]` returns **Reply to John Doe at johnd@email.com.**
  - `Form submitted by %u` returns **Form submitted by Anna Johnson (ajohnson0201).**
  - `Form approved by %u[approver][name]` returns **Form approved by Alex Lee**.
  - `Form transferred to %u[assignee][email]` returns **Form transferred to taylorreese@companyco.com**.

### %v - Form version

The system creates a new form version each time the supervisor updates the form, saves it, and deploys it. It's useful to know the version of a form to keep track of the changes that a supervisor made to it.

- Default property: **[version]**
- Other properties:
  - **[id]**: returns the unique identifier of the form version.
- Usage examples:
  - `Form version %v` returns **Form version 12**.
  - `Form version %v[id]` returns **Form version 11123**.

## Questions

Question references can return questions in a form as the user sees them on the Mobile App, and information that a user submitted as answers or comments.

Question references don't have a default property. You must include the Question Unique ID as a property.

### %a[Unique ID] - Question answers

The question answer reference returns the information a user submitted as an answer or a comment.

- Property: **[Unique ID]**

  Replace with the Unique ID of the question you want to reference.

  The topic [Overview Unique IDs](../../Published/360020428732.md) describes how to find the Unique ID of a question.
- Other properties:
  - **[Comment]**: The comment property returns question comments. Use the comment property after the Unique ID property.

  The topic [Question Comments](../../Published/360000759086.md) describes question comments in more detail.
  - **[display]**: For options-based questions, the display property returns the value displayed on the device. The display value can be the same as or different from the answer submitted to the server.

    The following topics describe options-based questions in more detail:

    - [Question Type: Button Group](../../Published/360020126172.md)
    - [Question Type: Card List](../../BuildAndManageForms/CreateOrEditAFormWithTheFormBuilder/QuestionTypes/QuestionTypeCardList.md)
    - [Question Type: Dropdown, Multiselect, and Radio Button](../../Published/360001421923.md)
- Usage examples:
  - `%a[EquipmentCondition]` returns **Fair**.
  - `%a[EquipmentCondition][Comment]` returns **The equipment has visible signs of wear that don't affect functionality**.
  - `%a[EquipmentCondition][display]` returns **Poor** when the value sent to the server is **0**.

### %e[Repeatable Section Unique ID] - Answers in a Repeatable Section

The Repeatable Section reference returns information from a specific Repeatable Section in your form. The expression returns all Repeatable Section entries as a string in the order that the rows appear in.

The topic [DREL for Repeatable Sections](../../Published/217831408.md) describes in detail the different DREL expressions that can extract responses from a Repeatable Section.

- Property: **[Repeatable Section Unique ID]**

  To find the Repeatable Section Unique ID, navigate to the form, and then select the **Pages & Questions** tab. The **Label** column contains the Unique ID.
- To return more specific results, and to return data from nested repeatable sections, add the following properties:
  - **[n]**: returns a specific row in a Repeatable Section, where `[n]` is the row number. Because row numbers are zero-based, use `[0]` to return data from the first row.
  - **[inner_drel]**: returns the response of the specified DREL expression within a Repeatable Section, where inner_drel is another DREL expression. For example:
    - `%e[Repeatable Section Unique ID][%a[Unique ID]]` returns the answer to the specified question for every row in a Repeatable Section.
    - `%e[Repeatable Section Unique ID][%q[Unique ID]]` returns the question text of the specified question for every row in a Repeatable Section.
  - You can also include plain text within the [inner_drel] expression to create a more structured response. For example:
    - `%e[Repeatable Section Unique ID][1][Repair %a[Unique ID] immediately.]` returns

      ```
      Repair answer to question in second row of the Repeatable Section immediately.
      ```
  - **[delimiter]**: separates the returned row values with the specified delimiter, such as `[+]` or `[,]`.
  - **[%e[Nested Repeatable Section Unique ID]]**: returns the contents of a nested Repeatable Section.
- Usage examples:

  A technician records the required materials for a job at a single site:
  - `%e[PartsList]` returns

    ```
    30pc Hex Bolts 2 True 50pc Washers 1 True 100pc Drywall Screws 3 False
    ```
  - `%e[PartsList][0]` returns

    ```
    30pc Hex Bolts 2 True
    ```

    where:
    - `[0]` is the `[n]` value that returns the first row of the Repeatable Section.
  - `%e[PartsList][%a[MaterialType]][, ]` returns

    ```
    30pc Hex Bolts, 50pc Washers, 100pc Drywall Screws
    ```

    where:
    - `[%a[MaterialType]` is an `[inner_drel]` expression that provides the answers to only the first question in every row of the Repeatable Section.
    - `[, ]` is a `[delimiter]` that separates the items.

  A technician records the required materials for one of many different locations in a building. They list each location in a Repeatable Section, and each entry contains a nested Repeatable Section for that location’s materials:
  - `%e[SiteMaterials][0][%a[SiteLocation]: %e[PartsList]]` returns

    ```
    Basement: 4pc Drywall 20 True Insulation 40 True 100pc Drywall Screws 5 False
    ```

    where:
    - `[0]` is the `[n]` value that returns the first row in the top-level Repeatable Section.
    - `[%a[SiteLocation]: %e[PartsList]]` is an `[inner_drel]` expression that includes two DREL references. The `%a` reference returns an answer from the top-level Repeatable Section (`Basement`). The `%e` reference returns all the contents of the nested Section.

### %q[Unique ID] - Question text

The question text reference returns questions as a user sees them on the mobile app.

- Property: **[Unique ID]**

  Replace with the Unique ID of the question you want to reference.

  The topic [Overview Unique IDs](../../Published/360020428732.md) describes how to find the Unique ID of a question.
- Usage examples:
  - `%q[EquipmentCondition`] returns **Select the condition of the equipment**.
  - `%q[NumberFireExtinguishers]` returns **How many fire extinguishers are in the building?**

## Answers with multiple properties

Some question answers have multiple properties. The **%a[Unique ID]** expression returns the answer a user submits by default. You can add another property to change what the expression returns using the syntax **%a[Unique ID][SecondProperty]**.

### Geo location

Geo location answers return an address by default. You can add a second property to return different information such as coordinates.

- Default property: **[address]**

  Returns the street address, city, state or province, zip or postal code.
- Other properties:
  - **[success]**: returns true if the system acquires the location successfully, or false if the system is unsuccessful.
  - **[geoSource]**: returns how the system acquired the location. Systems can acquire a location using GPS, for example.
  - **[timestamp]**: returns the date and time when the system acquired the location. The timestamp uses the GMT time zone.
  - **[coordinates]**: returns the latitude, longitude, and altitude of the location. Alternatively use **[coordinates.latitude]**, **[coordinates.longitude]**, or **[coordinates.altitude]**.
  - **[accuracy]**: returns the accuracy level of the coordinates in meters.
  - **[errorMessage]**: returns the reason for an acquisition failure. If the acquisition is successful, the system does not return an error message.
  - **[addressDetails][**thirdProperty**][**fourthProperty**]**:

    Use this property when you want to retrieve specific information about the address the system collected.

    When you use this property, you need to include a third property with the following possible values:
    - **[street_number]**: returns the street number.
    - **[route]**: returns the street name.
    - **[locality]**: returns the city name.
    - **[postal_code]**: returns the zip or postal code.
    - **[administrative_area_level_1]**: returns the state or province.
    - **[administrative_area_level_2]**: returns the county.
    - **[country]**: returns the country.

    The fourth property is optional. You can include the following values:
    - **[longName]**: returns the full value. This is the default, so you don’t need to include it.
    - **[shortName]**: returns an abbreviation of the value. This property only has an effect on the **[route]**, **[administrative_area_level_1]**, and **[country]** second properties.
- Usage examples:
  - `Coordinates %a[SiteLocation][coordinates]` returns **Coordinates -23.76312, 80.44416, 25.55454**.
  - `Location acquired via %a[CompanyAddress][geoSource]` returns **Location acquired via GPS**.
  - `Delivery address: %a[CustomerAddress] `returns **Delivery address: 333 Tulip Lane, Kingston, ON, J3K 1A1, Canada.**
  - `%a[Location][addressDetails][country][shortName]` returns **CA**

### Date and time

Date and time answers use default date and time formats. You can add a second property to change how the system returns date and time.

- Default properties: For dates, **[yyyy-MM-dd]**. For time, **[HH mm ss]**
- Other properties: You can customize the way the system returns dates and times by using the symbols specified in the [%d - Date of the form submission](#%25d) and [%t - Time of the form submission](#%25t) sections.
- Usage examples:
  - `Parcel delivered on %a[DeliveryDate][MMMM d, yyyy] at %a[DeliveryTime][hh:mm a]` returns **Parcel delivered on April 16, 2019 at 09:11 AM.**
  - `Vehicle purchased in %a[PurchaseDate][yyyy]` returns **Vehicle purchased in 2018**.

### Attachment

Attachment answers return information about images or documents that users submitted.

- Default property: **[bytes]**

  Attachment answers return the file encoded in Base64 by default.
- Other properties:
  - **[filename]**: returns the name of the file.
  - **[contentType]**: returns the file type.
- Usage examples:
  - `Technician uploaded the file %a[Attachment][filename]` returns **Technician uploaded the file Inspection_223233.pdf**.

### Barcode

Barcode answers return numeric or alphanumeric strings that users scanned and submitted.

- Default property: **[barcodeValue]**

  Barcode answers return the value of the barcode by default.
- Other properties:
  - **[barcodeType]**: returns the type of barcode the user scanned. Barcodes might be UPCs, QR Codes, or other commonly used barcodes.
- Usage examples:
  - `Tracking number %a[TrackingBarcode]` returns **Tracking number 1234567890**.
  - For use in a [Dispatch Data Destination](../../Published/217500148_DispatchDataDestination.md), you must specify both the type and value:

    `%a[TrackingBarcode][barcodeType]|%a[TrackingBarcode][barcodeValue]` returns UpcE|123456. In the destination form, this gets converted into type and value.

    Do *not* add static text at the beginning of the expression.

## Special characters and line breaks

You can use DREL to escape special characters or line breaks in submitted form data. This can help with third-party system integrations.

The following table describes the DREL syntax used for different formats.

<table style="width: 100%;">
<col/>
<col/>
<col/>
<thead>
<tr>
<th>Format</th>
<th>DREL expression</th>
<th colspan="2">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>JSON</td>
<td><code>%a[CustomerFeedback][#escapeJson]</code>
</td>
<td colspan="2">
<dl>
<dt>Input</dt>
<dd><span class="userInput">Excellent service.</span>
</dd>
<dd><span class="userInput">Thanks for the speed and attention to detail.</span>
</dd>
<dt>Result</dt>
<dd><code>Excellent service.\nThanks for the speed and attention to detail.</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>XML</td>
<td><code>%a[CustomerName][#escapeXml]</code>
</td>
<td colspan="2">
<dl>
<dt colspan="2">Input</dt>
<dd colspan="2"><span class="userInput">Gatwell &amp; Bowman</span>
</dd>
<dt colspan="2">Result</dt>
<dd colspan="2"><code>Gatwell &amp;amp; Bowman</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>HTML</td>
<td><code>%q[InspectLabel][#escapeHtml]</code>
</td>
<td colspan="2">
<dl>
<dt colspan="2">Input</dt>
<dd colspan="2"><span class="userInput">Locate the section "Equipment Information" on the label and take a picture.</span>
</dd>
<dt colspan="2">Result</dt>
<dd colspan="2"><code>Locate the section &amp;quot;Equipment Information&amp;quot; on the label and take a picture.</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>CSV</td>
<td><code>%g[address][#escapeCsv]</code>
</td>
<td colspan="2">
<dl>
<dt colspan="2">Input</dt>
<dd colspan="2"><span class="userInput">95 Walnut Street, Ottawa, ON K1A 2B3, Canada</span>
</dd>
<dt colspan="2">Result</dt>
<dd colspan="2"><code>"95 Walnut Street, Ottawa, ON K1A 2B3, Canada"</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>URL</td>
<td><code>%u[name][#escapeUrl]</code>
</td>
<td colspan="2">
<dl>
<dt colspan="2">Input</dt>
<dd colspan="2"><span class="userInput">Harold Petrov</span>
</dd>
<dt colspan="2">Result</dt>
<dd colspan="2"><code>Harold%20Petrov</code>
</dd>
</dl>
<p class="tip" data-mc-autonum="Tip:">You can URL encode data from DREL expressions that you want to use as part of a URL. For example, the endpoint for a Salesforce Apex REST Data Destination, or the URL Suffix in an HTTP Data Destination.</p>
</td>
</tr>
</tbody>
</table>

## Related Topics

- [Introduction to DREL](DRELIntroduction.md)
- [DREL Quick Reference](DRELQuickReference.md)
- [Test DREL Expressions](H3DREL/HowToUseDREL/TestDREL.md)
- [Escape Special Characters and Line Breaks for Template-driven Text Documents](../../IntegrateWithOtherSystems/EscapeDRELFreemarkerHandlebarsOutput.md)
