List ITERATE variable values

To access the List ITERATE variable value in the ITERATE action, use $ as the prefix before the variable name.

For example, if a List ITERATE is defined with basis foo, bar, baz, and variable %l1, then $%l1 can be used to retrieve the basis value in translation.

This is an example of a copy list value to outbound:

{ { OP ITERATE }
{ TYPE list }
{ BASIS {foo bar baz} }
{ VAR %l1 }
{ BODY {
{ { OP COPY }
{ ERR 0 }
{ IN {{$%l1}} }
{ OUT 1(%l1).PV1.00458 }
}
}}
}      

Using ITERATE variables correctly

All ITERATE variables must start with % and be one of:

  • f (field)
  • g (group)
  • l (list)
  • s (segment)
  • u (user).

Other characters do not pass the validation.

For example, it is incorrect using %s1 for a list. It should be %l1.

Double %s1 are used in an xlt file for another type (list and segment). This leads to double free for a variable, and causes "undefined behavior."