You are here:
Expression Set Resources
Expression set versions can have these resource types: variables, constants, and local list variables. Local list variables are hierarchical resources (you can create parent and child hierarchies with them), while variables and constants are flat resources. Define and use variables—the placeholders for dynamic values—and constants—the placeholders for fixed values—in expression sets for inputs, outputs, and values passed between steps. Numeric variables and constants follow specific assignment rules.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled |
Here are some considerations for creating and using expression set resources.
- When you create an expression set version resource, make sure that the resource name
begins with a letter. A resource name can contain periods, but not special characters,
spaces, and consecutive underscores.
Examples of valid resource names: Example1, Example_1, Example.1, example, example1
Examples of invalid resource names: Example__1, 1Example, Example%1, _example1
- When you create an expression set, you can initialize resources with null or default
values.
- To initialize the expression set version resources with null values, turn off the Initialize resources to default values option when you create an expression set. To customize how null values are handled, use the IsNull and IsNotNull operators and functions in the condition, list filter, and calculation steps.
- To initialize the expression set version resources with default values, turn on the Initialize resources to default values option.
- If you use the lookup table element as a step in an expression set version, the input and output variables from the table are imported as local resources of the expression set version.
-
When you create new resources in the expression set version, make sure that the resource names aren't the same as the input variable names of the imported lookup tables.
- When you enter your calculation formula or use the advanced mode to enter the condition logic manually, use a space before and after an operator.
- Ensure that the name of a field alias that’s available for an expression set’s usage type or subtype, and the name of a variable aren’t the same.
- Ensure that you map usage subtypes to the correct usage type.
Guidelines for Using Numeric Variables in Expression Sets
- If a variable is to the left of one equal sign (=), the variable's current value is used
in the calculation.
For example,
x + variable = ymeans that the value ofyisxplus the current value of variable. - If a variable is to the right of one equal sign (=), the equation's output is the new
variable value.
For example,
x + y = variablemeans that the value of variable is the sum ofxandy. - The current value of a variable on either side of a comparison operator (==, >,
>=, <, <=, or <>) is used to determine whether the comparison is
true.
For example,
x + y == variablereturnstrueif the sum ofxandyis equal to variable. - A variable keeps the assigned value until another operation changes the value.
For example:
x = 2 y = 3 variable = 0Step 1:
x + y = variable// 2 + 3 = 5 // variable = 5Step 2:
y + y = variable// 3 + 3 = 6 // variable = 6Step 3:
variable + y = variable// 6 + 3 = 9 // variable = 9Step 4:
variable + variable = variable// 9 + 9 = 18 // variable = 18
Guidelines for Local List Variables in Expression Sets
Local list variables store temporary values from a context definition. You can create local nodes and attributes in the expression set to mimic the nodes and attributes of the context definition it is connected to.
You can use a local list variable only within the expression set version, and they can’t be accessed by any external processes. The values stored by a local list variable are not passed back to the context definition.
- For a local list attribute variable, the parent node must be a local list node variable. You must create a local list node variable before you create a local list attribute variable.
- For a local list node variable, the parent node can be a context definition node or another local list node variable.

