Articles in this section

How to get the value from a specific column and row within an External Data Source using ExternalDataSources[]

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

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Space owner access to the Templafy tenant.

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}}

  Note

The 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:

externaldatasources_categories.png

  Important

Please 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

  Important

Plain 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
lower answer headers tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.