Shaking the Dependency Tree | FileMakerHacks
THIS BLOG POST by Darren Terry is mandatory reading memorizing for every FileMaker developer of any skill level. Understanding how the calculation engine updates will make your life much simpler:
FileMaker Pro has a very powerful calculation engine built into it. The calculation engine is exposed to us in a number of ways: calculation fields, script steps, conditional formatting, filtered portals, web viewers, chart objects, etc. But it can be a challenge to determine precisely when various kinds of calculations will refresh, and what causes them to refresh.
CALCULATION FIELDS
Calculation fields fall into two broad categories: stored and unstored. Stored calculation fields only ever evaluate or re-evaluate under three circumstances, as far as I can tell:
-
When they are defined or redefined, all existing records in the table will immediately have the calculated value stored in the field.
-
When a new record is created, it will immediately calculate the stored calc field values.
-
Whenever local referenced data is changed. This happens whether the referenced field is on the layout or not.
Honestly, go read this now. Then memorize it. And be sure to download and explore the example file.
Shaking the Dependency Tree | FileMakerHacks.