Rules for Creating Formulas

Home   Back   Next  

Working with Formulas > Rules for Creating Formulas

 

This page offers general rules for creating formulas and ways to determine whether a formula is valid:

 

 

Rules for Creating Formulas

 

Expressions must follow a set of rules for the software to interpret them. To create a formula with correct syntax, the following rules apply:

 

The expression must be the correct type for the data operation for which it is used. If the data operation requires a logical condition, then the expression needs to produce a logical condition.
All of the fields, functions and values used in the expression must have data types that can be used correctly together.
All of the fields, functions and values used in the expression must be spelled and formatted correctly.
All the functions used in the expression must have the correct set of parameters.
Each open parenthesis, "(" used in the expression must have a corresponding close parenthesis, ")", and vice-versa.
If the expression has multiple fields, functions or values, these expression elements must be combined correctly.
All operators used in the expression must be positioned and employed correctly.
All text values must be contained within a set of double quotation marks: " ".
The expression must not contain any mathematically impossible elements, such as division by zero.
The expression must not contain any extraneous fields, functions, values, symbols or other elements.

 

 

Valid and Invalid Expressions

 

When you create formula, it needs to be valid in order for the software to accept it. A valid formula is one that is syntactically correct, meaning that the identifiers, functions, operators and values in the expression are arranged as discussed in the above rules.

 

The formula builder has a built-in tool that lets you know the validity of any given formula by showing either a green check mark for a valid formula or a red "X" for an invalid one.  This formula checker automatically updates as you type.