Calculate

The Calculate action node allows you to perform mathematical operations on flow variables.

You can use two types of mathematical operations:

  • Comparison: variables are compared against each other as per the expression - if it matches, a 'Yes' result is returned, if it doesn't match, a 'No' result is returned.

  • Calculation: the result of the expression is calculated and stored under a session variable [[actionName:result]] - in other words, if you want to refer to the result of this calculation, that is the variable name you should use. If successfully calculated, a 'Yes' result is returned, else a 'No' result is returned.

Setup of a Calculate node

Example flow containing Calculate node

The below table describes some examples of mathematical expressions you can define in Flow. You can create expressions as simple or complex as required.

Description

Example

+ - / *

Standard math calculations (add, subtract, divide, multiply)

a+b, a-b, a/b, a*b

= > < >= <=

Standard comparison operators (equals to, greater than, less than, greater than or equals to, less than or equals to)

a=b, a>b, a<b, a>=b, a<=b

!=

Not equal to comparison operator

a!=b