Catalogue of Operators, Functions and Inputs

This topic is a catalogue of the operators, functions and inputs that can be used in calculated columns and calculated header fields. It is divided into:

For each function and input described below, simple examples are given. These are initially displayed collapsed so that you can search through the list to find the function or input you are looking for. You can then expand the example to see more information.

See the Formula Gallery for examples of how specific problems can be solved using combinations of the available functions and inputs.

Functions

The formula editor has a range of functions available for you to use. These are found in the side panel under Functions. You can type a function directly into your formula or build them from the side panel.

Basic Operators

+ Addition

An arithmetic addition operation. As a binary operator, it requires an operand on either side of the operator.

operand+operand

— Subtraction

An arithmetic subtraction operation. As a binary operator, it requires an operand on either side of the operator.

operandoperand

/ Division

The mathematical operator for division. As a binary operator, it requires an operand on either side of the operator.

numerator / denominator

* Multiplication

An arithmetic multiplication operation. Note that implied multiplication, i.e. putting factors adjacent to one another, is not supported. The * operator must be explicitly used.

factor * factor

% Modulo

An arithmetic modulo operation. This is an integer division operation that returns the remainder after the number is divided by a divisor.

numerator % denominator

< Less than

A logical less-than operator.

variable < test-condition

> Greater than

A logical greater-than operator.

variable > test-condition

<= Less than or equal to

A logical less-than-or-equals operator.

variable <= test-condition

>= Greater than or equal to

A logical greater-than-or-equals operator.

variable >= test-condition

== Equal

A logical equality operator.

variable == test-condition

!= Not equal

A logical not-equal operator.

variable != test-condition

& And

A logical And (&) operation.

({column1.value} < 1) & ({column2.value} > 5)

| Or

A logical Or (|) operation.

({column1.value} < 1) | ({column2.value} > 5)

NOT — Not

A logical NOT operation.

NOT(test-condition)

String Functions

str — String

A type conversion function that converts the input expression to a text string.

str(value)

left — Leftmost characters

This function is used when you want only a certain number of digits or text letters to be displayed. It returns the specified number of the leftmost characters from a string.

left(string,count)

right — Rightmost characters

This function is used when you want only a certain number of digits or text characters to be displayed. It returns the specified number of the rightmost characters from a string.

right(string,count)

upper — Uppercase

This function is used when you want to change the case of a string to uppercase.

upper(expression)

lower — Lower case

This function is used when you want to change the case of a string to lowercase

Lower(expression)

trim — Trim text

This function is used to remove both the preceding and following text or blank spaces from a string.

trim(expression,text)

ltrim — Trim off text left of a substring

This function removes the specified text or blank spaces found at the beginning of a string.

ltrim(expression,text)

rtrim — Trim off text right of a substring

This function removes the specified text or blank spaces found at the end of a string.

rtrim(expression,text)

len — Length of string

This function returns the number of characters (length) in a string.

len(expression)

concat — Concatenate strings

Concatenates two or more strings. The last parameter in the function argument identifies a separator that will be injected between tokens to separate them in the result. If no separation between the input strings is needed, use a pair of single quotes ' ' as an empty separator string.

concat(expression1,expression2,expression3,separator)

startsWith — Tests if a string starts with substring

The result is true if the string starts with the specified prefix value; otherwise it is false. You can provide optional start and end information, specifying the position to search the expression.

startsWith(expression,prefix) or

startsWith(expression,prefix,start,end)

endsWith — Tests if a string ends with substring

The result is true if the string ends with the specified suffix value; otherwise it is false. You can provide optional start and end information, specifying the position to search the expression.

endsWith(expression,prefix) or

endsWith(expression,prefix,start,end)

contains — Tests if a string contains a substring

The result is true if the specified search space contains the target value; otherwise it is false.

contains(search space,target)

search — Tests if a string contains a character pattern

The result is true if the string contains the matched object; otherwise it is false.

search(regex,expression)

Numeric Functions

trunc — Truncates a number to the decimal point

Removes all digits to the right of the decimal point for any value.

trunc(decimal)

round — Rounds a number to integer

Rounds a decimal value to the closest integer.

round(decimal)

ceil — Rounds a number to next integer

Increments a decimal value to the next highest integer. 

ceil(decimal)

floor — Rounds a number to previous integer

Decrements a decimal value to the next lowest integer.

floor(decimal)

abs — Absolute

Returns the absolute value of a given expression.

abs(expression)

pow — Power

Returns the given expression raised to the specified power.

pow(base,exponent)

log — Logarithm

Returns the natural logarithm of the expression, when no base is specified. When the optional base is provided, returns the logarithm of the expression to the specified base.

log(expression) or

log(expression,base)

sqrt — Square Root

Returns the square root of a given expression

sqrt(expression)

Row Aggregate Functions

These produce a single output value across a set of input values.

avg — Average

Averages the set of any given amount of specified values.

avg(numeric1,numeric2 ,numeric3)

median — Median

Returns the median value, number in the middle, of any given amount of specified values.

median(numeric1,numeric2 ,numeric3)

min — Minimum

Returns the minimum value of any given amount of specified values.

min(numeric1,numeric2 ,numeric3)

max — Maximum

Returns the maximum value of any given amount of specified values.

max(numeric1,numeric2 ,numeric3)

sum — Sum

Sums the set of any given amount of specified values.

sum(numeric1,numeric2 ,numeric3)

Conditional Functions

ifElse — Conditional Test

The ifElse conditional function is the natural function to use when a condition is being tested. It evaluates a test condition and if true, the first result value provided will be returned. If the test condition is false, the second result value provided will be returned.

ifElse(test-condition,true-result,false-result)

ifThen — Conditional Switch

The ifThen conditional function is used when a number of conditions need to be tested. In this sense, it is more like a switch or case statement than an if conditional, but it is not limited to testing a single conditional input. Provide a list of comma-separated conditional expression pairings inside square brackets, with each pairing comprising a test condition and a result value to return if the test condition is true. The ifThen statement will return the result value of the first conditional expression pairing where the test condition is true. There is no specific limit for the number of conditional expression pairings that can be listed.

ifThen(

[test-condition1,result1],

[test-condition2,result2],

[test-condition3,result3])

in — Test if in Set

The in conditional function returns true if the result of the expression is found in the set of test items. There can be any number of test items not just three.

in(expression,test-item1,test-item2,test-item3)

Trigonometric Functions

sin — Sine

Calculates the trigonometric sine of an angle, expecting the angle provided to be in radians (not degrees).

sin(angle)

cos — Cosine

Calculates the trigonometric cosine of an angle, expecting the angle provided to be in radians (not degrees).

cos(angle)

tan — Tangent

The trigonometric tangent function, expecting the angle provided to be in radians (not degrees).

tan(angle)

asin — Arc Sine

The trigonometric arcsine (or inverse sine) function. Calculates the arcsine of an angle returning a result in radians (not degrees).

asin(angle)

acos — Arc Cosine

The trigonometric arccosine (or inverse cosine) function. Calculates the arccosine of an angle returning a result in radians (not degrees).

acos(angle)

atan — Arc Tangent

The trigonometric arctangent (or inverse tangent) function. Calculates the arctangent of an angle, in radians.

tan(angle)

atan2 — Arc Tangent (y/x)

The two-argument trigonometric arctangent (or inverse tangent) function, taking y and x arguments instead of a distance as an input, where (x,y) are the coordinates of a point; the result is the angle between the positive x axis and the vector to (x,y). atan2(y,x) is the same as atan(y/x). The result is an angle in radians.

atan2(y,x)

Angle Functions

degrees — Degrees

Calculates the angle from radians to degrees.

degrees(angle)

radians — Radians

Calculates the angle from degrees to radians

radians(angle)

Table Functions

previous — Previous Row

Use this function to reference data for a column from the previous row. You can also, optionally, specify the initial value that should be used when the function is applied to the first row, i.e there is no previous row value to obtain. If no initial value is provided, then 0 will be used instead.

previous (column.name) or

previous(column.name,initial-value)

You cannot use the previous function for a column that is also used elsewhere in a function. For instance, the following function fails with a 'An argument of the function has an inappropriate type' error:

To achieve the goal of referencing both the current and previous values for a column in the same function, you will need to create a new calculated column that contains the value of the previous row and reference that calculated column instead:

Here the new column PrevAz is created referencing the previous Azimuth

Then the PrevAz column is used in the formula to check for Azimuth deviation

Date Functions

You can include calculated columns when creating a new column. Below are the functions that can be used:

today — Today

Use this function to add the current local date stamp. This function works best in date and text column types.

today()

dateAdd - Date Addition

Use this function add a specified number of days or weeks to the input date. This function works best in date and text column types.

dateAdd({date-value},add-value,unit)

dateDiff- Date Difference

Use this function to return the difference in either days or weeks between the specified dates. The latter date should be listed first, before the initial date, to enable accurate subtraction. This function works best in numeric and text column types.

dateDiff(latterDateValue-initialDateValue,unit)

year - Year

This function takes a date and displays only the year. Only text and numeric column types will work with this function.

year(dateValue)

month - Month

This function takes a date and displays only the month. Only text and numeric column types will work with this function.

month(dateValue)

day - Day

This function takes a date and displays only the day. Only text and numeric column types will work with this function.

day(dateValue)

date — Date

Use this function to format the input string expression that is in ISO 8601 format as a date. Only date and text column types work with this function.

date(expression)

dateStr - Date String

This function formats the input date as a text string controlled by an explicit format string. Choose either text or numeric column types, depending on if the result is text or numeric. The date column type does not work with this function.

dateStr(dateValue,expression)

Explicit Format String Expression Will Display As Example
%a Weekday, short version Wed
%A Weekday, full version Wednesday
%w Weekday as a number 0-6, 0 is Sunday 3
%d Day of month 01-31 27
%b Month name, short version Dec
%B Month name, full version December
%m Month as a number 01-12 12
%y Year, short version, without century 24
%Y Year, full version 2024
%Z Timezone AEST
%j Day number of year 001-366 365
%U Week number of year, Sunday as the first day of week, 00-53 52
%W Week number of year, Monday as the first day of week, 00-53 52
%C Century 21
%x Local version of date 31/12/2024

Constants

E — e Constant

The constant e, the base of the natural logarithm, is an existing item you do not need to define yourself. It is approximately equal to 2.71828.

PI — pi Constant

The mathematical constant pi, the ratio of a circle's circumference to its diameter, is an existing item you do not need to define yourself. It is approximately equal to 3.14159.

Inputs

There are a range of options for inputs available for you to use in building your formula. These are suggested as you type your formula, or you can find them in the side panel of the formula editor. The inputs will mostly vary depending on which table you are in. However, some inputs will always be available; these are described below.

Entry Inputs

Project — Project Name

References the active project name

{Project.Name}

Activity — Activity Name

References the active activity name

{Activity.Name}

Hole/Point — Drill Hole or Point Name

References the active hole/point name

{Hole/Point.Number}

Collection Inputs

Projects — Projects Name

References the project name you have specified.

{Projects.Name}

Activities — Activities Name

References the activity name you have specified.

{Activities.Name}

Header Field Inputs

Header Fields

References the header field you have specified.

{Header.FieldName}

External Input Columns

External Columns

Reference multiple columns, across tables. To reference an external column from a table other than the one you are editing, select External Input Column from the inputs and complete the parameters for that column in the window that appears.

{ExternalInputColumnName}

Ranked Columns Inputs

Sample Result Ranked Columns

Reference the sample result in a samples table where a ranked column has been used.

Ranked column inputs only applies to calculated columns on sample tables. Ranked columns are a numeric input.

{RankedColumnName,Unit(ActivityName)}

If the sample results have already been released, the formula will not run. To get the formula to run on a samples table you will need to unrelease the results, then release them again.