Breadcrumbs

Calculation syntax

Here is the detailed syntax of values that can be used in your calculations and variables.

Variable expressions

Syntax

Output

Description

Examples

$variable

any

Fetches a variable.

Variable names must contain only letters, numbers, hyphens, and underscores.

Variables are searched in the following order: current page -> current space -> global scope.

  • $customer

  • $company-name

  • $Q3_revenue

  • $totalCost

  • $SKU123

  • $GLOBAL_variable

  • $SPACE_variable

  • $PAGE_variable

any

Fetches a variable from a specific scope.

Use this when you need to access a variable from a particular scope, overriding the normal scope resolution order.

  • $GLOBAL_company-name

  • $SPACE_project_budget

  • $PAGE_taxRate

String expressions

Syntax

Output

Description

Examples

"text"

string

Defines a string literal.

Use backslash to escape quotes within strings.

  • "Hello World!"

  • "Price: $29.99"

  • "He said \"Hello\""

CONCAT(expression, expression, …)

string

Concatenates multiple expressions into a single string.

Non-string values are automatically converted to strings.

  • CONCAT("Hello", " World!")

  • CONCAT("Order #", 1234)

  • CONCAT("This", "is", "a", "long", "concatenation")

  • CONCAT("There are ", $days, " remaining days")

Numeric expressions

Syntax

Output

Description

Examples

  • integer

  • decimal number

number

Defines a numeric literal (integer or decimal).

  • 42

  • 3.14159

  • 1000.50

  • -25

number + number

number

Adds two numbers.

  • 100 + 25

  • 15.99 + $price

  • $subtotal + 5

number - number

number

Subtracts a number from another.

  • 1000 - 250

  • 365 - $days_used

  • $total - $discount

number * number

number

Multiplies two numbers.

  • 5 * 10

  • 32 * $unit_price

  • $hours * 40

number / number

number

Divides a number by another.

  • 100 / 4

  • 15 / $num_items

  • $revenue / 0.8

number % number

number

Returns the remainder of the division between two numbers.

  • 10 % 3

  • 100 % $count

  • $minutes % 60

Boolean expressions

Syntax

Output

Description

Examples

  • false

  • true

boolean

Defines a boolean literal.

  • false

  • true

  • NOT boolean

  • ! boolean

boolean

Applies a logical NOT to a boolean expression.

  • NOT false

  • !true

  • NOT $is_complete

  • !$is_delivered

  • boolean AND boolean

  • boolean && boolean

boolean

Applies a logical AND between two boolean expressions.

  • true AND false

  • false && true

  • false AND $is_active

  • $is_verified AND true

  • boolean OR boolean

  • boolean || boolean

boolean

Applies a logical OR between two boolean expressions.

  • true OR false

  • false || true

  • false OR $is_manager

  • $is_admin OR true

  • expression = expression

  • expression == expression

boolean

Indicates whether two expressions are equal.

  • 100 = 100

  • 12.5 == "John"

  • $is_delivered = false

  • 1000 = $price

  • expression != expression

  • expression <> expression

boolean

Indicates whether two expressions are different.

  • 42 != 43

  • 1.66 <> "Jane"

  • $is_verified != false

  • 36 != $quantity

number > number

boolean

Indicates whether a numeric expression is greater than another.

  • 100 > 50

  • 3.14 > 3

  • $temperature > 32

  • 2500 > $balance

number >= number

boolean

Indicates whether a numeric expression is greater or equal to another.

  • 21 >= 21

  • 75.25 >= 10

  • $score >= 90

  • 100 >= $minimum_threshold

number < number

boolean

Indicates whether a numeric expression is less than another.

  • 25 < 82

  • 0.5 < 1

  • $inventory < 100

  • 500 < $withdrawal_amount

number <= number

boolean

Indicates whether a numeric expression is less or equal to another.

  • 300 <= 200

  • 99.99 <= 100

  • $discount <= 50

  • 30 <= $wait_time