Database Reference
In-Depth Information
Field references tell the calculation engine where to find the
values
it'll be working on.
When the calculation is performed or
evaluated
, first the field references are replaced with
the actual values in those fields, then the operators tell FileMaker what to do to those values,
and finally, FileMaker returns a
result
in your field.
NOTE
FileMaker uses the value
stored
(not necessarily displayed) in a field. So if you have a number field
with 3.1415926 as the stored value, but you've formatted the field on the layout to display only two
decimal places, FileMaker still uses all the digits in the stored value to do its math.
Here are some helpful definitions of terms you'll see throughout the next chapters:
▪
Field references
are just what they sound like. They refer FileMaker to the data in the
field you specify. Since the data inside those fields can change on each record in your
database, the values in each record can give a different result.
▪
Constants
stay the same each time FileMaker does the calculation. Turn the page for de-
tails.
▪
Operators
tell FileMaker what to do with the values in the calculation. See
Using Oper-
ators in Calculations
for a listing of operators and what they do.
▪ FileMaker has more than 270 defined
functions
that you can use as shortcuts when you
create your formulas. You'll learn about some of the most common functions later in this
chapter.
Chapter 16
introduces you to more advanced functions and shows you how to
create your own reusable functions, called
custom functions
.
▪ Each calculation has a
result
. This result is, in a sense, the “answer” to the calculation.
The result of the first calculation above is the circumference of the circle. The second
calculation is a little more complex: Its result is the area of a circle
or
a rectangle, de-
pending on the value in the Shape field. (Don't worry if this calculation doesn't make
sense to you now. It will before too long.)
▪ The result of a calculation has a
type
(just like every field has a type). The type can be
any of the standard field types—text, number, date, time, timestamp, or container—or a
Boolean
yes/no result (
General
).
Chapter 10
goes into more detail about calculations and
data types.