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. |
|
| 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. |
|
String expressions
Syntax | Output | Description | Examples |
---|---|---|---|
"text" | string | Defines a string literal. Use backslash to escape quotes within strings. |
|
CONCAT(expression, expression, …) | string | Concatenates multiple expressions into a single string. Non-string values are automatically converted to strings. |
|
Numeric expressions
Syntax | Output | Description | Examples |
---|---|---|---|
| number | Defines a numeric literal (integer or decimal). |
|
number + number | number | Adds two numbers. |
|
number - number | number | Subtracts a number from another. |
|
number * number | number | Multiplies two numbers. |
|
number / number | number | Divides a number by another. |
|
number % number | number | Returns the remainder of the division between two numbers. |
|
Boolean expressions
Syntax | Output | Description | Examples |
---|---|---|---|
| boolean | Defines a boolean literal. |
|
| boolean | Applies a logical NOT to a boolean expression. |
|
| boolean | Applies a logical AND between two boolean expressions. |
|
| boolean | Applies a logical OR between two boolean expressions. |
|
| boolean | Indicates whether two expressions are equal. |
|
| boolean | Indicates whether two expressions are different. |
|
number > number | boolean | Indicates whether a numeric expression is greater than another. |
|
number >= number | boolean | Indicates whether a numeric expression is greater or equal to another. |
|
number < number | boolean | Indicates whether a numeric expression is less than another. |
|
number <= number | boolean | Indicates whether a numeric expression is less or equal to another. |
|