Formula Operators

Formula operators are expressions that can contain arithmetic operators. These operators determine how the formula manipulates variables and literals. For example, the plus operator (+) indicates that two items are added together. You can also use operators to concatenate strings.

Types of Operators

Here's a list of the operator types:

Operator

Description

Example

+

Addition

A = B + 1

+

| |

String concatenation

A = 'Hello ' + 'World'

B = 'Hello ' || 'World'

-

Subtraction

A = B - 1

-

Unary minus

A = -B

*

Multiplication

A = B * C

/

Division

A = B / C

Using Operators

You can use the arithmetic operators, subtraction, multiplication, and division only with numeric operands. You can use the addition operator with numeric or text operands. The operands can be variables, literals, or sub-expressions. A formula error occurs in these scenarios:

  • The second operand of a division equals zero

  • The result of multiplication is too large

    Whether a number is too large or not is determined by the normal limits in the database. For string concatenation, if the result is longer than 255 characters, a formula error occurs.

Expressions are evaluated in order from left to right. The unary minus has precedence over the other operators because it applies directly to a single sub-expression. The multiplication and division operators take precedence over addition and subtraction. For example, the expression 1 + 2 * 3 evaluates to 7 rather than 9. You can use brackets to change the precedence of the operators. For example, (1 + 2) * 3 evaluates to 9.