About this article
This article will explain what the document name setting is and provide examples of how it can be used with the binding syntax in smart templates.
- What is the document name setting?
- How to set the document name in a smart template?
- Document name examples
Prerequisites
|
What is the document name setting?
The document name sets the name for the document when a document is created with the Templafy WebApp 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 or dynamically by using the binding syntax.
|
How to set the document name in a smart template?
When building template settings and properties the Document Name
setting can be used to set the document name for a document created from a smart template.
To set the Document Name
follow the steps below:
- In the Template Designer open the Advanced tab.
- Click
+ Add property
.
- Select
Document Name
in theType
dropdown.
- Enter the required binding in the field
Document Name
.
- Click
Add to document
.
|
Document name examples
Example 1
Using the Document Name
setting to always set the name of the document to 'Memo.docx'.
Binding | Memo |
Example 2
Using the Document Name
setting to set the name of the document based on the value of the 'Subject' question originating from the response form.
Binding | {{Form.Subject}} | |
Input | Subject = "Invitation" | Subject = "Memo" |
Output | "Invitation.docx" | "Memo.docx" |
Example 3
Using the Document Name
setting together with the StringJoin() function to set the document name 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 | {{StringJoin(" ", "Memo", Form.Subject, UserProfile.Name)}} | |
Input |
Subject = "Invitation" Name = "Jane Doe" |
Subject = "Party" Name = "John Doe" |
Output | "Memo Invitation Jane Doe.docx" | "Memo Party John Doe.docx" |
|
Example 4
Using the Document Name
setting with HostSystem binding to set the document name with the 'Subject' value from an external source via an App connector.
Binding | {{HostSystem.Subject)}} | |
Input | Subject = "Invitation" | Subject = "Memo" |
Output | "Invitation.docx" | "Memo.docx" |
Related articles
Comments
Article is closed for comments.