This article explains what the document name setting is and provide examples of how it can be used with the binding syntax in smart templates.
Prerequisites
|
What is the document name setting?
The document name sets the name for the document when a document is created with the Templafy Web App and then downloaded. If the document name isn't set, the name of the template will be used by default. The document name can be set statically (using a plain text value) or dynamically by using the binding syntax.
Important
|
How to set the document name in a smart template
When building the template settings and properties, the Document Name setting can be used to set the document name for a document created from a smart template, following the steps below:
- In Template Designer, open the Advanced tab.
- Click + Add property.
- In the Type field select Document Name.
- In Document Name enter a static value (plain text without quotes) or a binding like
{{Form.Subject}}
. - Click Add to document:
- The field is added to the list with Document settings:
Document name examples
Example 1
Using Document Name with the value 'Memo' (without quotes) to always set the name of the document to 'Memo.docx'.
Binding | Output |
---|---|
Memo | "Memo.docx" |
Example 2
Using Document Name to set the name of the document based on the value of the 'Subject' question originating from the response form.
Binding | Input | Output |
---|---|---|
{{Form.Subject}} | Subject = "Invitation" | "Invitation.docx" |
Subject = "Memo" | "Memo.docx" |
Example 3
Using Document Name together with the StringJoin() function to set the document name by combining the text 'Memo', the value of the Subject question originating from the response form and the Name field originating from the User Profile, separated by a space.
Binding | Input | Output |
---|---|---|
{{StringJoin(" ", "Memo", Form.Subject, UserProfile.Name)}} |
Subject = "Invitation" Name = "Jane Doe" |
Title property = "Memo Invitation Jane Doe" |
Subject = "Party" Name = "John Doe" |
Title property = "Memo Party John Doe" |
Important
|
Example 4
Using Document Name with a HostSystem binding to set the document name with the 'Subject' value from an external source via an App connector.
Binding | Input | Output |
---|---|---|
{{HostSystem.Subject}} | Subject = "Invitation" | "Invitation.docx" |
Subject = "Memo" | "Memo.docx" |
Comments
Article is closed for comments.