Nesting FileMaker Expressions

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

You don’t hear the term expression used that much in FileMaker discussions but its generally accepted meaning is calculation content that returns a single value. To make a complex easier to manage, you might include one expression within another expression (considered nesting the expressions).

Here you can see some Russian nested dolls, also known as matryoshka. Each doll is a single unit inside of a larger unit.

1 + 3 * 2 = 8


(1 + 3) * 2 = 8, the (1 + 3) expression is nested within the main expression

1 + (3 * 2) = 7, the (3 * 2) expression is nested within the main expression

The calculation content between the parenthesis returns a single value and then used to determine another single value outside. The setup of the nested expression can alter the final result of the calculation.

An expression can contain full array of options such as numbers, literal text, fields and functions. A CASE function is a single expression, although it can have many possible returned values. An IF function inside of a case function could be considered a nested expression because it would return a single value, that in turn, is returned to support a calculated single value above it.