Stored, Unstored, and Global Fields

When you defined calculation fields in Part IV and Chapter 10, you may have wondered about the Specify Calculation dialog box’s Storage Options button (Figure 11-2). You learned about indexing and other storage options back in Chapter 3 (see Maximum number of characters). When you use similar options in your calculations, you exercise more control over the information your functions work with.

When you click the Storage Options button in the Specify Calculation dialog box, you can set global storage and indexing options, just like any other field type. You also get a choice you haven’t seen before: “Do not store calculation results.” With this option, you can make your calculations save information as a kind of snapshot or use the most up-to-date information as your database changes. This example shows the storage options for the Invoice::Total Due field, which is not stored because you want FileMaker to update if you add or edit any line item on the invoice. Notice though, that unstored calculations can’t be indexed. That means finds will be a little slower and you can’t use an unstored calculation as a key field ().

Figure 11-2. When you click the Storage Options button in the Specify Calculation dialog box, you can set global storage and indexing options, just like any other field type. You also get a choice you haven’t seen before: “Do not store calculation results.” With this option, you can make your calculations save information as a kind of snapshot or use the most up-to-date information as your database changes. This example shows the storage options for the Invoice::Total Due field, which is not stored because you want FileMaker to update if you add or edit any line item on the invoice. Notice though, that unstored calculations can’t be indexed. That means finds will be a little slower and you can’t use an unstored calculation as a key field (Keys).

Stored and Unstored Calculation Fields

Normally, a calculation field holds a value just like any other field. You can’t edit the value, because FileMaker creates it for you from the calculation. When you use this field ...

Get FileMaker Pro 9: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.