Set - A function to create and manipulate variables and change fields values
The function Set allows the creation of new variables that will be treated as fields (mappings) and then change that variables values.
The new value passed to Set function can be plain text, an existing field (mapping) or a Javascript field.
In the case of templates having Static Sections, you can create new variables outside of said Static Sections and use those variables inside the same Static Sections.
Definition:
${set(<variable name>,<new value>)} |
Note
The function Set can be also used to change the value of existing fields (existing mappings), but in that case, it has a limitation: all occurrences of that field in the document will be replaced with the value of the latest set that is applied.
Note
The values of all the variables (mappings) created with the Set function and used on the header/footer of a template will correspond to the last value passed to the set function.
Note
The Set function cannot be placed in the same Paragraph of Iterations, Conditional Blocks or Static Sections.
Prop - A function to set custom properties to be used by Xporter during the document generation
The main goal of this issue is to allow users to define properties that will be used later by Xporter during the document processing.
Usually, integrations require some extra configuration such as security tokens, API keys and other kind of configurations.
Specification
Function Name | prop |
---|---|
First Parameter | Key |
Second parameter | Value |
Notation
${prop(Key,Value)}
Example
${prop(my.first.property.key,qwerty12345)} ${prop(service.api.key,84f7970c-5f70-47d9-a4f2-c75151820ba0)} ${prop(service.api.username,userAdmin)}