Skip to main content

Calculate mathematical expression

Performs a calculation using operators, such as multiplication (*), division (/), subtraction (-), addition (+), etc. Full list of supported operators is found below.

Please note that the expression would be solved in order of operations (i.e. BEDMAS or PEMDAS).

Common use cases

  • Data manipulation

Category

  • Calculate

Inputs (what you have)

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Expression to solveThe expression to be solved. Expression does not support algebraic characters.See full list of supported operators in the section below.TextYes2*(4+6)

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NAMEDESCRIPTIONTYPEREQUIREDEXAMPLE
Expression resultThe value of the expressionNumberYes20.8

Outcomes

NAMEDESCRIPTION
SuccessThis status is selected when the expression was successfully solved.
UnsuccessfulThis status is selected in the event of the following scenarios:- Expression to solve contains operators other than *, /, -, + ,**, //, and %- Expression contains letters- Expression starts with an operator other than subtraction (-)

Supported Operators

* multiplication

/ division

- subtraction

+ addition

** power of exponent, e.g. 5**2=25

// integer division, also known as "floor division" , e.g. 5//2=2

% modulus division, e.g. 5%2=1

Note: A value that appears as None should be considered as zero(0)

Examples

For expressions like 5 + 2 , the result is 7.

For expressions like 2 ** 8 - 20*8/3 the result is 202.67.

For expressions like 2 * (4 + 3) result is 14.

Requirements

  • N/A