Calculations and comparisons

Create steps in your workflow that allow calculations and comparing data.

Calculating formulas

This operation allows you to carry out arithmetic operations.

  1. In your workflow editor, click + Add step.
  2. Select Integrations > Quick action.
  3. Click Configure.
  4. Click the Quick Action operation field and select Calculate formula.
  5. Enter your formula.
    Tip: you can include numbers, text, operators, and data references (the values in input fields from previous steps)
  • If you want to use the comparison result in later steps add the result variable in the Response data for use in later steps. The variable's value should be $.result

Comparing formulas

  1. In your workflow editor, click + Add step.
  2. Select Integrations > Quick action.
  3. Click Configure .
  4. Click the Quick Action operation field and select Compare formula.
  5. Enter your formula.
    Tip: you can include numbers, brackets, operators and data references (the values in input fields from previous steps)

Supported operations

Calculating formulas

-add1+1 = 2
-subtract4-2 = 2
/divide4/2 = 2
-multiply2*2 = 4
**exponents (to the power of)3**2 = 9
%remainder (amount left over)5%2 =

Comparing data

OperatorDescriptionExpression exampleResult
==equals2==2True
<less1<2True
>greater1>2
{1. New form - Date Input - Date (plain)} (%s) > {Instance start time} (%s)
False
True (used to compare dates)
<=less than or equal to2<=2True
> =greater than or equal to1>=2False
endswithLooks for text ending with a provided phrase; comparing ends of stringsendswith(".txt", "text.txt")

endswith(".txt", "{{data_reference_to_filename}}")
returns True if the string ends with the specified suffix, otherwise False.
startswithLooks for text starting with a provided phrase; comparing the beginnings of stringsstartswith("pata", "patata")

startswith("pata", "{{data_reference_to_filename}}")
returns True if the string starts with the specified suffix, otherwise False.
inChecks if a value exists within a sequence
Note that list evaluations such as 1 in [1,2,3] are not supported using in and not in operators.
"ana" in "banana" True
andboolean operator;
Use to combine multiple comparison expressions when you need all conditions to be true.
("monday"=="monday") and 2>1True
orboolean operator;
When using or , the combined condition evaluates to True if at least one of the individual conditions is True.
If all conditions are False, the combined condition will evaluate to False.
("{{data_reference_to_fruit}}") == ("apple") or ("{{data_reference_to_fruit}}") == ("banana") or ("{{data_reference_to_fruit}}") == ("cherry")True

Comparing regular expressions

Regex exampleDescriptionResult
match_regex('\\d{3}-\\d{2}-\\d{4}', '123-45-6789') Checks whether the string matches a specific regular expression patternTrue
match_regex('\\d{3}-\\d{2}-\\d{4}', '45-6789')Checks whether the string matches a specific regular expression patternFalse
match_regex('te.\*st', 'tessssst')Checks whether the string matches a specific regular expression patternTrue
match_regex('te.+st', 'test')Checks whether the string matches a specific regular expression patternFalse
match_regex("((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/\[\+~%\/.\\w-_]_)?\??(?:\[-\+=&;%@.\\w_]\_)#?(?:[.\!\/\\w]\*))?)", "[www.url-with-querystring.com/?url=has-querystring"](http://www.url-with-querystring.com/?url=has-querystring")Checks if the string contains a URL that matches the pattern defined by the regular expression.True
match_regex("((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/\[\+~%\/.\\w-_]_)?\??(?:\[-\+=&;%@.\\w_]\_)#?(?:[.\!\/\\w]\*))?)", "not_valid.url-with-querystring.com/?url=has-querystring")Checks if the string contains a URL that matches the pattern defined by the regular expression.False

📘

For limitations in the supported regular expressions, see Syntax (external page).
You can use this external page to test if your expression is correct.