var - any variable name, local variable name, or global variable name (see
About naming fields for guidelines on naming variables).
calculation - any calculation expression, field, or constant.
The Let function sets the variables from left to right. You can use previously defined variables (for example, variables that you defined with the Set Variable script step) to define new variable values, and you can nest one
Let function within another. If you use a previously defined variable within a nested
Let function, the variable has scope only within the nested function (as if you had defined a completely unique variable). See the City example shown below.
The following example shows how to pass named parameters using the Evaluate,
Let, and
Get(ScriptParameter) functions, allowing access only to variable
“a” (the example returns
6):
The following example shows how to pass named parameters, allowing access to both variable “a” and variable
“b”. The simplified first parameter makes the second parameter more complex (the example returns
6, 12):