
GoAutomate uses Excel-style formulas to handle data and set conditions. Since Excel is widely used, you might already be familiar with it, and there are plenty of examples and guides available online. Understanding formulas is key for effectively using GoAutomate to manage data.
Formulas enable you to manipulate and combine data in various ways. They provide access to common Excel functions like CONCAT
, PROPER
, and UPPER
. This means you can perform actions like joining text, capitalizing words, and converting text to uppercase. Additionally, formulas allow you to define logical conditions, perform calculations with numbers, and work with dates and times.
Formulas work similarly to those in Microsoft Excel. They include familiar functions you may already know. The process of creating formulas is also similar. There is however one difference to be aware of: GoAutomate represents data using specific data-types like Text, Number, or Date, rather than the general un-typed data found in Excel cells (which are then formatted into different data types). For example, if you have a Number in GoAutomate, you can't directly use the LEFT
function on it because the LEFT
function accepts Text as the first input. Instead, you need to convert the Number into Text using the TEXT
function before applying the LEFT
function. These differences are intended to ensure the robustness and reliability of your data. Apart from these minor variations, the formula usage should feel familiar.
Understanding formulas
The parts of a formula
A formula can include any of the following: Functions, Input Data, Output Data, Property Data, Variables, Constants, and Literals.
Here's an example to show the different parts:
Where
1 = the function ROUND
2 = the output Mileage
from the Trigger MyTrigger
3 = the constant Cvalue
4 = the variable Vvalue
5 = the literal values 12.5
and 2
Using step input data
You can use step Input data in formulas. This is helpful if you want to reuse the same data in different steps. To enter step input data in a formula, use this format:
@<activity_name>.in.<input_name>
For example:
@ReviewClaim.in.Amount
Using step output data
You can use Output data from a step in your formulas. This data is the key information from a step that you'll use in later steps of your automation. To include step output data in a formula, follow this format:
@<activity_name>.out.<output_name>
For example:
@ReviewClaim.out.Approved
Using step properties
You can include Property data from a step in your formulas. GoAutomate generates this data automatically, which helps you track details like when a step was completed and who completed it. To add step property data in a formula, use this format:
@<activity_name>.prop.<property_name>
For example:
@ReviewClaim.prop.CompletedOn
Using constants
To use a Constant value in your formulas, you ensure the same value is used everywhere it's needed. To add a constant in a formula, write it like this:
#<constant_name>
For example:
#MaxClaimValue
Using variables
Variables help you keep track of and update information during automation. To use a variable in a formula, write it like this:
$<variable_name>
For example:
$CurrentClaimValue
Using properties
GoAutomate automatically tracks details about your automation, like when it started and the current step. To use this information in a formula, write it like this:
@prop.<property_name>
For example:
@prop.StartedOn
Using literal values
Exact values, called Literals, are used just as they are written in a formula. How you enter these values depends on their data type:
Text values
Enclose text literal values in double quotes, like "Acme Corporation"
.
Number values
Write number literal values without any quotes, like 23.44
.
Logical values
Write logical literal values using the TRUE
or FALSE
functions.
Choice values
Write choice literal values starting with a question mark character, like ?apple
.
Person values
Write person literal values starting with person:
followed by the name of the person, enclosing in single quotes, like 'person:Fred Blogs'
.
Group values
Write group literal values starting with group:
followed by the name of the group, enclosing in single quotes, like 'group:Finance'
.
Date values
Enter date literal values, using the following functions:
DATE(2021, 11, 25)
DATEVALUE("25/11/2021")
Time values
Enter time literal values, using the following functions:
TIME(15, 0, 0)
TIMEVALUE("15:00:00")
Date/Time values
Enter date and time literal values, using the following functions:
DATE(2021, 11, 25) + TIME(15, 0, 0)
DATEVALUE("25/11/2021") + TIMEVALUE("15:00:00")
It's recommended to use literal values sparingly. If the same literal value is used in multiple places, it's usually better to use a Constant instead.
Using calculation operators
Calculation operators specify the type of calculation that you want to perform on the parts of a formula. There is a default order in which calculations occur (this follows general mathematical rules), but you can change this order by using parentheses.
Arithmetic operators
To do basic math operations like adding, subtracting, multiplying, or dividing numbers, use these arithmetic operators.
Arithmetic operator | Meaning | Example |
---|---|---|
+ (plus sign) | Addition | 3+3 |
- (minus sign) | Subtraction Negation | 3-1 -1 |
* (asterisk) | Multiplication | 3*3 |
/ (forward slash) | Division | 3/3 |
Comparison operators
You can compare two values using these operators. The result will be either TRUE or FALSE.
Comparison operator | Meaning | Example |
---|---|---|
= (equal sign) | Equal to | #Cvalue = $Rvalue |
> (greater than sign) | Greater than | #Cvalue > $Rvalue |
< (less than sign) | Less than | #Cvalue <> $Rvalue |
>= (greater than or equal to sign) | Greater than or equal to | #Cvalue >= $Rvalue |
<= (less than or equal to sign) | Less than or equal to | #Cvalue <= $Rvalue |
<> (not equal to sign) | Not equal to | #Cvalue <> $Rvalue |
Text concatenation operator
Use the ampersand (&) to join multiple text values into one.
Text operator | Meaning | Example |
---|---|---|
& (ampersand) | Connects, or concatenates, two values to produce one continuous text value | "North"&"wind" results in "Northwind" |
Using parentheses
Parentheses change the order in which parts of a formula are calculated. Enclose in parentheses the part of the formula to be calculated first.
For example, in the formula 5+2*3
, multiplication is done first, so the result is 11 (2 times 3, then add 5).
However, if you use parentheses like this: (5+2)*3
, addition is done first. So, 5 plus 2 equals 7, and then 7 is multiplied by 3, giving 21.
Types of formulas
Input Mapping
Formulas to map data to Activity Inputs.
Output Preset
Formulas to set initial values for Activity Outputs.
Variable Initialisation
Formulas to set starting values for Variables.
Variable Update
Formulas to update Variable values during the automation.
Validation Logic
Formulas to define when Outputs and Variables are valid.
Conditional Logic
Formulas to show, hide, enable, or disable form fields.
Path Condition
Formulas to choose the path or paths for a Conditional Branch.
Activity Assignment
Formulas to assign people to an Activity.
Activity Completion
Formulas to define how many people need to complete an Activity.
Step Property
Formulas to set specific properties of Steps.