Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: » No topics above this level «

Variables

Scroll Prev Top Next More

In InterFormNG2 there are 4 kind of variables:

 

1.User defined variables, that you define in the designer.

2.Workflow variables. They can be defined in the workflow either by setting a single variable or multiple variables at a time.

3.Predefined input variables. These are variables, that contain information about the input file. One kind of input variables are the spooled file attributes, but there is also a set of variables covering input XML files.

4.Predefined output variables. The value of these variables can be setup before you generate various kinds of output in InterFormNG2.

 

The list of all predefined variables (and user defined workflow variables) can be found in the workflow, if you setup an Xpath expression and click the variables tab.

 

Common variables between workflow and templates

Please notice, that there is an overlap between the variables in the designer and the workflow variables. So if you create a workflow variable and a designer variable with the same name, then the value is shared. That can be used e.g. to transfer information between the workflow and a template. In the designer you can use the workflow variable element to test how the template would react to a specific value setup in the workflow. A value set on a variable in the designer template, can also be used in the workflow after calling the template.

 

Variables are referenced in Xpath expressions with a preceding dollar sign ($) e.g. $Myvariable.

 

Please notice, that variables are case sensitive, so e.g. $var is not the same as $Var.

 

 

Limitation regarding workflow variables and booleans

Please notice, that there is a limitation when it comes to workflow variables and booleans (true() and false()). The workflow variables are handled as strings, when it contains a boolean.

 

This example will e.g. NOT WORK:

 

We try to use a workflow variable with a boolean to indicate if a logo should be included or not:

 

ng2variables001

 

- and we combine this with this template:

 

ng2variables002

 

Then we STILL get the logo in the output - even though the variable, InsertLogo is false.

 

The reason is, that if we use a workflow variable as a condition, then the workflow variable is handled like a string and this does not work....

 

Instead you should define the workflow variable as a string as below:

 

ng2variable003

 

- and then compare the workflow variable with a string in the template:

 

ng2variables004

 

 

 

 

Variables can be used all over InterFormNG2:

 

1.In the templates

2.In the designer components.

3.In mail templates

4.In transform files

5.In the workflow components.