Configure an Expression activity
Configure the Expression activity to define a rule for performing operations on data.
Add an activity to the map.
By default, the Configuration tab is open in the properties panel of the activity.
- Change the default Name of the activity to something meaningful.
- On the Type list, select .
The Expression dialog box is displayed.
Target variable list, select a process or server variable.
The value resulting from the expression rule is held in this target variable.
- Optional. Enter a Description for the expression node.
Right-click on the rule editor and define an
Expression using the Process variables, Server variables and/or functions
(Math, Text and Date) as needed. Add as many expressions as needed.
You can reuse the expression by copying and pasting it in another expression activity.Be careful in using literal values in your expression. If a literal value includes a decimal point such as 123.45, the data type is double. If you try to assign this literal value to a variable defined as a decimal or in a calculation that expects a decimal, the compilation fails. Therefore if you wish to use decimal values in your expression, you should create a variable of type Decimal and store the literal value in the variable.
To validate the expression, click
If the expression rule is invalid, an error message appears.
Optional. To ensure the results and format are as expected, click
The Test expression dialog box displays the variable values.The Test option is not available in on-premise multi-tenant and Azure environments.
The expression is executed and the test result is displayed. You can change the variable values and retest the expression, if needed.
Click Cancel if you do not want to test the expression.
- Click Add.
- Save or release the process map.
- Configure other properties for this activity. See Activity properties.