Handlebars - Form Submission Metadata References

Available on the Advanced and Enterprise tiers:

Essentials
Advanced
Enterprise

About

In this article you will learn how to reference form submission metadata in Handlebars. 

If you are looking to reference form submission answer data, please see Basic Question References, or Advanced Question References

Referencing Form Submission Metadata

Tip:To see all of the form submission metadata available to you, navigate to a form submission in the TrueContext admin portal and download the standard JSON file.

Screen_Shot_2019-09-19_at_8.34.26_PM.png 

The dataRecord container wraps the entire form structure. The root node to use to reference any of the submission data, including the metadata is dataRecord.

Simple Metadata References

The following is an excerpt of the first few lines of the standard JSON output of a form submission. 

{
"identifier": "1811776168",
"version": "v2",
"zone": "America/Toronto",
"referenceNumber": "20190919-18117761683",
"name": "Form Submission Name 2019-09-19 08:48:19",
...
}

Extract the metadata from any node using a reference compiled as follows: {{dataRecord.node}} 

Example:  {{dataRecord.identifier}} 

Result: 18117761683

Metadata References with Multiple Properties

Some metadata elements, such as the user, have multiple properties. 

"user": {
"identifier": "133936022",
"username": "jane.doe",
"displayName": "Jane Doe (jane.doe)"
}

Starting from the root node(dataRecord), traverse through the tree to the final node you want to reference. The format used to extract a single property from any metadata node is as follows: {{dataRecord.node.property}} 

Example: {{dataRecord.user.identifier}} 

Result: 133936022