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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.