This topic describes all the Data Record Expression Language (DREL) references and properties supported by ProntoForms.
Supported on all tiers:
Contents
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.
%d - Date of the form submission
The date reference returns the date when a user submits a form.
Default property: [yyyy-MM-dd]
Other properties:
You can customize the date format by using any 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 Usage examples:
Form submitted %d[dd-MM-yyyy]
returns Form submitted 25-06-2020.%d[EEEE, MMMM d, yyyy]
returns Wednesday, July 23, 2020.Week %d[w, yyyy]
returns Week 38, 2020.
%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
%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.
Info:The topic Dispatch Metadata and Inbox Views 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 and time 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.
%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.
[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 ProntoForms 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 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.
Note:The term transferred only applies to ProntoForms Teamwork-enabled forms.
DispatchDeclined A mobile user declined a form dispatched to them.
Complete A mobile user sent a completed form. The ProntoForms server received and processed the completed form.
Incomplete A mobile user transferred an incomplete ProntoForms Teamwork-enabled form. The form is now either unassigned or reassigned to another user.
Edit A supervisor sent a completed form for editing.
Usage examples:
Reference number %r
returns Reference number 20200211-1811522422.Form %r[state]
returns Form incomplete.
%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 when a user submits a form.
Default property: [HH:mm:ss]
Other properties:
You can customize the time format by using any 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 Time zone [z], [zzzz] EDT, Eastern Daylight Time Usage examples:
Form submitted at %t
returns Form submitted at 12:57:43.%t[hh:mm a]
returns 01:25 PM.
%u - User information
The User information reference returns information about the user who submitted the form.
Default Property: [displayName]
The Display Name property returns the user's name and username.
Example: Jane Doe (jdoe@prontoforms.com)
Other properties:
- [id]: returns the user's unique identifier in the ProntoForms system.
- [username]: returns the user's username.
- [name]: returns the user's first and last name.
- [email]: returns the user's email.
- [alias]: returns the user's alias. Go to Setting Up User Aliases to learn how aliases work.
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).
%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.
%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.
Info: The topic Overview: Unique IDs 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?
%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.
Info: The topic Overview: Unique IDs 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.
Info:The topic Question Comments describes question comments in more detail.
Usage examples:
%a[EquipmentCondition]
returns Fair.%a[EquipmentCondition][Comment]
returns The equipment has visible signs of wear that don't affect functionality.
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.
- [timestamp]: returns the date and time when the system acquired the location. The timestamp uses the GMT timezone.
- [coordinates]: returns the latitude, longitude, and altitude of the location. Alternatively use [coordinates.latitude], [coordinates.longitude], or [coordinates.altitude].
- [errorMessage]: returns the reason for an acquisition failure. If the acquisition is successful, the system does not return an error message.
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.
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 and %t - Time of the form submission 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 size 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.
Comments
0 comments
Please sign in to leave a comment.