Variables in Transformations

How to calculate an intermediate value, keep it out of the result, and use it in rules or export conditions.

A variable stores an intermediate result for the current table row or the current JSON/XML element. Use it when the same calculated value is needed in several rules, conditions, or result fields, or as an intermediate step in calculating another value.

The variable itself is not written to the result file. Only fields that use the variable value are exported.

Where to Enable It

Table editor. Open the result column settings and enable Make this column a variable.

Animation of enabling a variable in the Eofferix table editor
Open the column settings, scroll to the variable block, save the settings. After saving, the column is shown as a variable.

XML editor. Open the node settings and enable Make this node a variable.

Animation of enabling a variable in the Eofferix XML editor
After saving, the XML node receives a variable label and changes directly in the snapshot.

JSON editor. Open the node settings and enable Make this node a variable.

Animation of enabling a variable in the Eofferix JSON editor
After saving, the JSON node receives a variable label and no longer looks like a regular result node.

The root JSON/XML node cannot be a variable.

Variable Number

The number defines calculation order. Variable 1 is calculated before variable 2. If one variable uses another one, the first variable must have a lower number.

If you enter a number that is already used, Eofferix swaps the variable numbers. The comment is only for the user: it explains what the variable stores.

How to Use It

  • Select the variable in a rule check field when the rule must check the calculated value.
  • Select the variable in a rule value or template when it must be inserted into the result.
  • Use the variable in export conditions when a field or element should be exported only for a calculated value.