About this article
This article will explain the HostSystem binding, what it is and when to use it.
Prerequisites
|
|
What is a Host system?
Overall, there are two different ways of including external data into documents:
- With a Data Connector and external data sources, which is covered in this article: External Data Sources.
- With an App Connector setup to Host systems, which is covered below.
Host system is relevant to use, when you start your document creation flow from the Host system and from there need to populate a document with data hosted in that system.
Host systems work together with an App Connector and sends data gathered from the system the App Connector integrates to.
Examples of commonly used Host systems from which you can use to the HostSystem binding to reference data:
Example 1
In the example below, we re-use the example mentioned in the article: How to configure Document Creation Services 1.1 integration, so for more context, please go that article.
Using the syntax {{HostSystem.<friendly name>}} in the bindings field in Dynamics Designer, in this example, becomes: {{HostSystem.Subject}}
Example 2
You can use a HostSystem field in an IfElse function, but using a HostSystem field as return value is (currently, August 2021) not supported, so for example the binding {{IfElse(Equals(HostSystem.Organization, ""), HostSystem.Address1, HostSystem.Address2)}} will not work.
The solution is to place both fields Address1 and Address2 in the template and using Visibility hide the address when applicable:
Binding | {{HostSystem.Address1}} | |
Visibility | {{IfElse(Equals(HostSystem.Organization, ""), VisibilityType.Hidden, VisibilityType.Visible)}} | |
Input | HostSystem.Organization = "Templafy" | HostSystem.Organization = empty |
Output | Address1 is shown | Address1 is hidden |
Binding | {{HostSystem.Address2}} | |
Visibility | {{IfElse(Equals(HostSystem.Organization, ""), VisibilityType.Visible, VisibilityType.Hidden)}} | |
Input | HostSystem.Organization = "Templafy" | HostSystem.Organization = empty |
Output | Address2 is hidden | Address2 is shown |
|
Related articles
Comments
0 comments
Article is closed for comments.