TeleFlow BasicScript StandardMath
From TeleFlow
Performing mathematical calculations with the Run Basic Script step only requires the use of the basic math operators. They are:
- =: Set the variable on the left side of the = side equal to the total calculated value of the operations on the right. See examples with the operations below.
- +: Add (Eg. "@MY_VARIABLE = 5 + 5" sets TeleFlow variable @MY_VARIABLE to 10)
- /: Divide (Eg. "@MY_VARIABLE = 5 / 5" sets TeleFlow variable @MY_VARIABLE to 1)
- -: Subtract (Eg. "@MY_VARIABLE = 5 - 5" sets TeleFlow variable @MY_VARIABLE to 0)
- *: Multiply (Eg. "@MY_VARIABLE = 5 * 5" sets TeleFlow variable @MY_VARIABLE to 25)
- ^: Exponent (Eg. "@MY_VARIABLE = 5 ^ 5" sets TeleFlow variable @MY_VARIABLE to 3125)
- (): Brackets groups operations to ensure certain calculations take precedence, per "standard math"(brackets, exponents, division, multiplication, addition, subtraction). Examples:
- "@MY_VARIABLE = 5 * 5 + 5 * 5" sets TeleFlow variable @MY_VARIABLE to 50
- "@MY_VARIABLE = (5 * 5 + 5) * 5" sets TeleFlow variable @MY_VARIABLE to 150
Related Steps
