Sidebar
0 votes
2.4K views
by john-d-7501 (140 points)
Curious as to what advantages using a template has over mapping directly from the source node into the output mesage?

1 Answer

0 votes

The Evaluate Template page in QIE Help explains QIE's built-in 'Evaluate Template' function, and the Recipes include worked template examples for message types like HL7, JSON, CSV and XML.

by gary-t-8719 (15.6k points)
edited ago by sam-s-1510
by john-d-7501 (140 points)
I'm looking more for examples where the Template would be more beneficial than a direct mapping, using both I dont see much use in the templates but I only have limited examples.
by brandon-w-8204 (34.8k points)
Using templates vs mapping is really a preference of who is creating the interface. Using a mapping will let you move the template to a system variable and if you need to make changes you can do that without changing the code in the channel. It also allows you to visually see what your message will look like vs a mapping function that just is code.

I do not have specific examples of when a template is used vs a mapping as far as specific interfaces. It is more based on the person that is creating the interface and what they would like to use. One example is if you have someone that knows your message but does not know the code. You can use a template that they can update in the system variables and not have to modify the channel.

One other use is if you use the same template for multiple interfaces. You can reference the same system variable from 2 or more channels and if you need ot update something you can update it and all the channels will pick up the changes vs mapping in the channel and updating all the channels.
...