Database Reference
In-Depth Information
Chapter 16. Advanced Calculations
In the earlier calculation chapters, you learned how calculations can make your databases
work harder for you. But the functions you've learned so far can't make your databases work
much smarter . For example, what if you want to add a five-percent delinquency charge to in-
voices over a month old? You could create a special “past due balance” field on a special lay-
out that you use only when you've searched for late invoices, but that's just extra complexity
to create and then maintain, if the late fee rules change later on. On the other hand, if you
create a calculation that makes a decision based on current data, you can let the database it-
self figure out when to apply late fees, and it works for every invoice, not just the late ones.
This chapter shows you how to give your calculations that brainpower by using logical func-
tions and other advanced techniques.
The calculation engine can also be used to give FileMaker features it doesn't have. You (or
someone you hire) can create a plug-in in a programming language like C++. But you don't
have to create a plug-in yourself. Lots of great ones are available from third parties ( Creating
Your Own Plug-ins ) . Whether you write a plug-in or buy it, each plug-in adds new functions,
like file handling, credit card processing, or web services, to FileMaker's Specify Calculation
window.
NOTE
To create plug-ins, you need FileMaker Pro Advanced ( Chapter 13 ). Once you've installed a plug-
in, though, it can be used in any version of FileMaker.
But before you learn any of those new concepts, you'll revisit Boolean logic and learn more
about how the Self() function can make your calculations reusable in other fields. And
you'll finally find out how and when to set a calculation field's storage options.
Understanding Boolean Functions
Boolean functions aren't a distinct group like Text or Number functions. Nor is Boolean a
choice in the “Calculation Result is” pop-up menu. It's the result of a calculation that makes
it Boolean. Regular calculations return results like 3.14 or 753 or “Dread Pirate Roberts.”
Boolean results refer to the theory of logic, and can always be reduced to either “true” or
“false,” “yes” or “no,” “not empty” or “empty.” Conditional formatting calculations are al-
ways Boolean, since FileMaker needs to know if a particular condition is true before it can
decide when to apply the formatting you set up. You can learn a lot about Boolean calcula-
Search WWH ::




Custom Search