About this article
This article will explain what the ExternalDataSources[] function is and provide examples of how it can be used with the binding syntax in smart templates.
Prerequisites
|
What is the ExternalDataSources[] function?
ExternalDataSources[] is a function that returns the values from a specific external data source row.
ExternalDataSource[] logic
Syntax | {{ExternalDataSources.DataSourceName[NameValueToLookUp].DataSourceColumnName}} |
|
ExternalDataSources[] function examples
In the examples below this external data source is used.
|
Example 1
Using the ExternalDataSources[] function with plain text to retrieve the CategoryName from the row that contains Category ID "3".
|
Binding | {{ExternalDataSources.Categories["3"].CategoryName}} |
Input | n/a |
Output | Confections |
Example 2
Using the ExternalDataSources[] function with plain text to retrieve the Description from the row that contains Category ID "3".
Binding | {{ExternalDataSources.Categories["3"].Description}} |
Input | n/a |
Output | Desserts, candies, and sweet breads |
Example 3
Using the ExternalDataSources[] function with plain text to retrieve the CategoryName based on the value of the "CategoryId" question originating from the response form:
Binding | {{ExternalDataSources.Categories[Form.CategoryId].CategoryName}} |
Input | Form.CategoryId = "5" |
Output | Grains/Cereals |
Example 4
Using the ExternalDataSources[] function with plain text to retrieve the CategoryName based on the value of the "CategoryId" question originating from an App Connector:
Binding | {{ExternalDataSources.Categories[HostSystem.CategoryId].CategoryName}} |
Input | HostSystem.CategoryId = "5" |
Output | Grains/Cereals |
Related articles
Comments
0 comments
Article is closed for comments.