Variables

You can store the results of mapping rules in variables to retrieve them later. Variables must be preceded by a $. When assigning a variable, you should specify the variable with two $$ ($$) (z.B. eBiss.Excel.LoadTab) characters, in which case the value to be stored is not saved as a string. An example:

Rulename Selection Target
r_rule substring(@Gtin,1,7)='99999' $InvalidEan

After the evaluation, for example, the variable $InvalidEan contains the value' false' and a further vertgleich must then check for' true' or' false', because since $InvalidEan is not empty, the following is always true.

Rulename Selection Target
rs_ruleset $InvalidEan

If you use $$InvalidEan instead, the boolean value is in the variable.

Rulename Selection Target
r_rule substring(@Gtin,1,7)='9999999' $$InvalidEan

Furthermore, whole structure turn can be stored in variables, e. g. results of GroupByEx, etc.

remarks

reset

To delete or reset the object, use the function ClearVariable. An assignment with an empty string fails because an empty selector leads to a non-evaluation. This means that the following rule is not even executed:

Rulename Selection Target
r_rule '' $$InvalidEan

selection

The variable must always be read with exactly one dollar sign or, even better, with the function XVar, This is considerably faster than direct access, e. g. in a loop, when multiple readouts are performed.