Recursive expressions
- Updated: 2019/01/15
Recursive expressions
Use a recursive expression to insert a variable in the place of an index or key of a dictionary, list, record, or table variable.
A recursive expression contains a variable nested inside of another variable (the outer variable). The value of the outer variable is conditional based on the value of the nested variable.
For example, the list variable $listOfPlanets$
has the following
values: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune. The
Number variable $indexPosition$
has value of 2. The expression
$listOfPlanets[$indexPosition$]$
returns
Earth
.
The following types of expressions are supported. You can create a recursive expression
containing up to 10 expressions.
- $dictionaryVariable{$key$}$
- $listVariable[$index$]$
- $recordVariable[$index$]$
- $tableVariable[$rowIndex$][$columnIndexOrName$]$
Note:
- You cannot use a Table variable within a List variable. For example, the
following expression is not supported:
$vListStr[$vTable[0][0]$]
- You cannot combine expressions with properties. For example, the following
expression is not supported:
$dictionaryVar{$listStrVar[2]$}.String:reverse$