About this article
This article will explain what the binding syntax is within smart templates and how to use it. The binding syntax is especially used when creating complex smart fields or when setting up template settings and properties.
- What is the binding syntax?
- What is the binding syntax for the user profile?
- What is the binding syntax for the response form?
- What is the binding syntax for an App Connector?
- How to use the binding syntax?
Prerequisites
|
What is the binding syntax?
The binding syntax is utilized inside smart templates in order to create dynamic relations between the template and the data that should be injected inside it or to manipulate the visibility of elements.
Sometimes when working with smart fields, the response form, or template settings and properties, one will need to manipulate the binding syntax to achieve the expected result. Once the basic syntax is in place, one can add functions, conditions, and operators to create more complex use cases.
What is the binding syntax for the user profile?
In order to link to a form field originating from the user profile, one must use:
- For textbox, checkbox, combo box, and date fields:
{{UserProfile.FormFieldName}}
- For dropdowns:
{{UserProfile.FormFieldName.DataSourceColumnName}}
It is necessary to specify the column of the data source that should be used in the binding
In the above syntax, FormFieldName
and DataSourceColumn
must be replaced by the actual path to the data.
Where to find the syntax for the user profile?
The FormFieldName
of a user profile can be found inside the Template Designer in Word and PowerPoint or through the Admin Center.
Inside the Template Designer
|
|
Inside the Admin Center
|
|
What is the binding syntax for the response form?
In order to link to a form field originating from the response form, one must use:
- For text, checkbox, flexible dropdown, number, and date questions:
{{Form.FormFieldName}}
- For dropdowns and Data connector questions:
{{Form.FormFieldName.DataSourceColumnName}}
It is necessary to specify the column of the data source that should be used in the binding
In the above syntax, FormFieldName
and DataSourceColumn
must be replaced by the actual path to the data.
Where to find the FormFieldName for the response form?
The FormFieldName
of a response form can be found inside the Template Designer through the Template
tab in Word and PowerPoint, or through the Form
tab in Word, PowerPoint, and Excel.
Inside the Template Designer through the Template tab
|
|
Inside the Template Designer through the Form tab
|
|
What is the binding syntax for an App Connector?
HostSystem values are relevant when the document creation flow starts from another system through an App connector, such as Salesforce, SharePoint, Document Creation Services 1.1, and others, or through the Document Generation API.
In order to link to external data originating from an App connector or an API request, one must use:
- The data is in the first layer:
{{HostSystem.DataName}}
- The data is in the third layer:
{{HostSystem.DataNameLayer1.DataNameLayer2.DataNameLayer3}}
In the above syntax, DataName
must be replaced by the actual path to the data.
Where to find the DataName?
- How to find the data available from the Salesforce App Connector?
- How to find the data available from the SharePoint App Connector?
- How to enable Document Creation Services 1.1 App Connector?
|
How to use the binding syntax?
The binding syntax can be used in many different ways to serve several needs. For example, the binding syntax can be used to set up template settings and properties, set custom visibility for elements, on smart fields to create advanced and complex dynamics, and more.
Template settings and properties
When creating template settings and properties for smart templates, the binding syntax will be required to achieve the expected result.
Example of adding the subject response form as document name and the user profile name as an author |
Custom visibility
Sometimes, when building smart templates, it may be necessary to adjust the visibility of a single element or a group of elements based on one or more conditions.
Example of adjusting the visibility of the smart field "Subject" originating from the response form, if the subject isn't filled by the user, hide the smart field in the template, otherwise show the user input. |
|
Advanced smart fields
On occasions, it might also be necessary to create more advanced smart fields and utilize different functions, conditions, and operators together to achieve the expected result.
Example of editing the "Name" smart field to enforce the user name to be fully capitalized when inserted in the smart template. |
|
Related articles
Comments
0 comments
Article is closed for comments.