About this article
ExternalDatasources[] is a function that returns a row of an external data source. It is possible to get data from a data source by the first column. This article will explain the binding syntax and show examples how this can be configured in the Dynamics Designer.
Pre-requisites
|
Syntax
Syntax | {{ExternalDataSources.DataSourceName[FirstColumnValueToLookUp].ColumnName}} |
The 'FirstColumnValueToLookUp' can be plain text or a form field. Using a form field you can use it as a variable, so the output depends on the input of the user.
The function can be used in the Binding field on the Element
tab in Dynamics Designer:
Examples
In the examples below this external data source is used:
|
Example 1
Get CategoryName from the row that contains Category ID "3".
|
Binding | {{ExternalDataSources.Categories["3"].CategoryName}} |
Input | n/a |
Output | Confections |
Example 2
Get 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
Get Category Name from the row that contains the value of the form field Form.CategoryId.
Binding | {{ExternalDataSources.Categories[Form.CategoryId].CategoryName}} |
Input | Form.CategoryId = "5" |
Output | Grains/Cereals |
Example 4
Get Category Name from the row that contains the value of the HostSystem field HostSystem.CategoryId.
Binding | {{ExternalDataSources.Categories[HostSystem.CategoryId].CategoryName}} |
Input | HostSystem.CategoryId = "5" |
Output | Grains/Cereals |
Comments
0 comments
Article is closed for comments.