This is the If element:
The If element executes a sub tree (folder/container) of elements, only if a certain condition is met, and another folder of elements (else), if the condition is false. The properties are these:
So above you set the datatype (select between Text, Boolean, Number or Date) and set the comparator (‘=’, ‘<‘, ‘>’....).
Both the left and right side of the comparison can be set like this:
So both the left and right side can be a constant value, a value from the XML file found via Xpath (as above), a variable, a function, a value from a translation table or even a meta data key. If you refer to XML, you can also chose to refer to a special cursor (pointing to a place in the XML file) instead of the default cursor via ‘Cursor reference name’.
The IF includes an Else folder. In case the condition in the If is not true, then all elements in the Else folder are executed. Below we output a text constant depending on a test on a node in the input XML file:
Please notice, that if the Else folder is empty, it is shown in grey like below. In this way you can be sure it is empty without the need to actually open the folder.