This article explains 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.
ExternalDataSources[] logic
Syntax | {{ExternalDataSources.DataSourceName[NameValueToLookUp].DataSourceColumnName}} |
---|
NoteThe ExternalDataSources[] function is used for external data sources while the DataSources[] function is used to capture data from a (local) data source row. |
ExternalDataSources[] function examples
In the examples below this external data source is used:
ImportantPlease note that creating external data sources requires owner or admin rights to the tenant. |
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 |
ImportantPlain text must be enclosed in quotation marks. |
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 |
Comments
Article is closed for comments.