Database Reference
In-Depth Information
data a calculation refers to, you see FileMaker update the data automatically. Figure 9-1
shows where calculation fields can benefit your Invoice layout.
Figure 9-1. Without calculations, you have to manually calculate the extended price for each line
item by multiplying the quantity times the price. And then, if the quantity changes, you have to visit
your calculator again. But with calculation fields, the database does the math as soon as there's
data in the fields the calculation refers to. Here the Extended Price field multiplies Price Each by
Quantity. Plus, if data in either field changes, FileMaker updates the Extended Price automatically.
FREQUENTLY ASKED QUESTION: TEXT CALCULATIONS?
Aren't calculations just for numbers?
Many people see the Manage Database window's Calculation field type and assume it's for num-
bers. Too bad, because calculations can do all this:
▪ Calculations can pick apart text and put it together in different ways (on Putting a Web Viewer
on a Layout , you'll use a calculation to make a web address that links to a customer's address
map). You can even modify fonts, sizes, colors, and styles (turn every occurrence of the word
“credit” to bold text, for instance).
▪ You can do math on dates, times , and timestamps . You can find out how old someone is based
on his birthdate, figure out how long you worked on a job, or see which payment came first.
▪ If you've stored a reference to a file in a container field, then you can use a calculation to re-
trieve the path to the original file.
You can even convert one kind of value into another when you use calculations. For example, if you
have a text field that contains “12/29/2014,” then you can use a calculation to turn that date into a
proper date value (such as December, 29, 2014 or Dec. 29, 2014).
They're so useful that if you have a problem to solve, a calculation is likely to form at least part of
the solution.
Search WWH ::




Custom Search