How can we help?
Custom Calculations
Overview
In DataXchange there are only two places where calculations can occur and be used for non-comparison functionality: parameters for variables, and custom variable targets.
The calculations can occur only when the four math operators are included in an expression: PLUS, MINUS, MULTIPLY and DIVIDE.
Examples
These examples show math operations used with custom variables.
- This sets the variable “some_custom_variable” to the same as the current value for “[MTC.xcom]”.
[PCSDB.send_save_custom_variable_value] {some_custom_variable} == [MTC.xcom]
- This will set the value of the variable “x_following_error” to the number ‘32’.
[PCSDB.send_save_custom_variable_value] {x_following_error} == 32
- In the following case the value for “x_following_error” will be the number ‘3’.
[PCSDB.send_save_custom_variable_value] {x_following_error} == (5 MINUS 2)
- Here the value for “x_following_error” will be ‘10’.
[PCSDB.send_save_custom_variable_value] {x_following_error} == (5 MULTIPLY 2)
- This sets the value for “x_following_error” to ‘(5 > 2)’.
[PCSDB.send_save_custom_variable_value] {x_following_error} == (5 > 2)
- In this example the value for “x_following_error” will be ‘(5 < 2)’.
[PCSDB.send_save_custom_variable_value] {x_following_error} == (5 < 2)
NOTE: This functionality will also work for [PCSDB.send_custom_variable_indicator], but the value for the indicator must be a color.
IMPORTANT: The previous syntax for this was using a single ‘=’ sign. It has been changed to double ‘==’ equal signs so it is not confused with the single ‘=’ equal sign used for comparisons.