Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: Designer > Design elements

Variable element

Scroll Prev Top Next More

It is possible to define one or more variables in the InterFormNG2 designer. The advantage is, that you can use variables e.g. to add up all the detail lines of a page and output the page total in the footer.

 

You can also use variables in normal XPath functions.

 

Another kind of variable is the workflow variable, which can be used for sending variables/information from the workflow to the template.

 

Please note, that the name of a variable is not allowed to start with a number, it cannot contain a dollar sign and the variable names are case sensitive.

 

This video introduce the use of variables in the designer:

 

 

 

You define and update a variable with this icon:

 

NG2Varable0001

 

 

The icon is found by clicking the '+' icon to reveal the second row of design elements:

 

NG2Varable0002

 

The properties of the variable element are shown below:

 

NG2Varable0003

 

The name

The name field is the name of the variable. You can refer to the variable in XPath functions after the variable has been created or updated by preceding the variable with a dollar sign ($), so if you e.g. want to add 1 to the variable above then you can insert a new variable element with the expression: $MyVar+1.

 

Expression

The expression field is an XPath expression for the data, that you want to put into the variable. If you want to assign text constant to a variable, then you need to delimit the text with either single quotes (') or double quotes (").

 

Description

The description is an optional description of the variable. It can help to remind you of what this variable is used for.

 

After a variable has been created you can always see a list of the defined variables, when you use the magnifying glass on the many design elements:

 

NG2Varable0004