Database Reference
In-Depth Information
Using Operators in Calculations
The power of calculations comes from their ability to combine various values to come up
with a new and meaningful value. Here's where operators come in. An operator takes the
values on either side of it (the operands ) and does something (operates) with them.
A special symbol or word stands for each operator. This calculation uses the + (addition) op-
erator:
3 + 2
In this case, the + operator is given 3 and 2 as operands. When the calculation is evaluated,
the operator and its operands combine to produce a single value.
Operators come in three flavors:
Mathematical and logical operators combine two values into one. The + operator is a
good example; it takes two number values, and adds them together. Its resulting value is
the sum of the two numbers.
Comparison operators compare two values. For example, the = operator tells you if two
values are exactly the same. This kind of operator always produces a Boolean value.
Parenthesis operators are used to group parts of a calculation together. Remember your
eighth-grade math teacher carrying on about PEMDAS or the “order of operations”
(working from left to right, calculating within parentheses starting with exponents first,
then multiplication and division, and finally addition and subtraction)? FileMaker re-
members, too, and it uses those same rules to figure out how to evaluate calculations. If
the rules don't work for you, then parentheses let you take more control.
NOTE
Two buttons in the Specify Calculation window's Operators section aren't really operators at all.
The ¶ is a special character that tells FileMaker you want a new line in your calculation result, and
the quotation marks are for entering text values.
Mathematical Operators
A calculation's most obvious use is to do a little math, so you'll use these operators often.
Maybe your database of products includes fields for dimensions (Length, Width, and
Height), and you want to know the volume. This calculation does the trick:
ShapeLength * Width * Height
Search WWH ::




Custom Search