Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Conditional Expressions | Addressing Variables
 
Addressing Variables
 
Addressing Variables that Contain Special Characters
In an expression, you can refer to the values of variables that are children of other variables and refer to the values of elements in an array variable. To address children of variables or an element in an array, you need to use a directory-like notation to describe the position of the value.
Use this notation…
To…
variableName
Address a variable.
Example: state
Variable state.
variableName/childVariableName
Address the child variable of a variable (such as a field in a document).
Example: %buyerInfo/state%
Variable state within IS document type state.
arrayVariableName[index]
Address an element in an array.
Example: orderItems[0]
Value of the first element in the orderItems array.
arrayVariableName[rowIndex][columnIndex]
Address an element in a two-dimensional array (String table).
Example: dictionary[1][2]
Value of the element located in the third column of the second row in the dictionary array.
duplicateVariableName(index)
Address an occurrence of a variable where there are multiple variables with the same name in the document or pipeline. The index is zero-based.
Example: address(1)
Value of the second variable named address.
%"variableWithSpecialCharacters"%
Address a variable whose name contains special characters. Variables that contain special characters must be enclosed in quotation marks.
Example: %"address(work)"%
Value of the variable named address(work). For more information, see Addressing Variables that Contain Special Characters.
Notes:
*To view the path to a variable in the pipeline, rest the mouse pointer over the variable name. Designer displays the variable path in a tool tip.
*To copy the path to a variable in a pipeline, select the variable, right-click, and select Copy.
*You can enclose variable names in %, for example %buyerInfo/state%. If the variable name includes special characters, you must enclose the path to the variable in % (percent) symbols and enclose the variable name in " " (quotation marks). For more information about using variables as values in expressions, see Syntax.