Database Reference
In-Depth Information
In the first case, it receives only one parameter. In both the second and third cases, you're passing
two parameters. In the third case only, the second parameter is actually a list of values. Functions
like this are rare, but a few exist.
Result Type
Just as you specify field types when you create fields, you also specify result types for your
calculations. If you change a field to a calculation type field, FileMaker uses its former field
type as the automatic result type. But you can use the Result Type pop-up menu to override
the automatic setting. And when you create a calculation field from scratch, the Calculation
result is automatically set as “Number,” but that's not always what you want. Your result
type should match the function type. That is, if you're using a Date() function, set the result
type to Date. If you're concatenating data from text fields, then Text is the result type you
want. It's common to forget to change the result type when you create calculations, so if
you're not getting what you expect from your calculations, check the result type setting.
Calculation Box
Your calculation itself goes in the Calculation box in the middle of the window (it has the
field name above it as a label). You can type right into the Calculation box if you're a code-
head, but mere mortals usually use the field list, operators, and function list, and let
FileMaker assemble their calculations for them. When you're getting started, you probably
mostly point and click, but as you get more familiar with formulas and functions, you'll start
typing more often. Most people end up using a hybrid of typing and clicking to create their
calculations.
TIP
You can also copy and paste into the Calculation box. If you have a calculation in another table file
that's the same or similar, you can paste and then update it for its new home, saving yourself some
typing. See the Self() function on Using the Self() Function . It can reduce or even eliminate edit-
ing when you reuse a calculation.
Changing the Standard Evaluation Behavior
At the bottom of the Specify Calculation dialog box is the standard option “Do not evaluate
if all referenced fields are empty.” Since the option is meant to improve performance, you'll
leave it selected most of the time. When this checkbox is turned on and all referenced fields
are indeed empty, the calculation result will be blank.
Search WWH ::




Custom Search