When a geological rift forms, scientists see discovery and possibility. What will you discover?

Getting Global Calculations to Behave


Here is a list of items to keep in mind when using Global Calculations.  It was originally written by Ray Cologon back in 2007/2008 (and reposted around different blogs and the FileMaker Cafe)…but I believe most of it still applies to how it works today in he current versions of FileMaker.  I’ll repost with an update if I find out otherwise.
1. A global calc will update automatically if it references a global field that is located in the same table and that field is edited by the current user.
2. A global calc will update automatically if it references a regular field that is located in the same table (and referenced directly) when that field is edited on any record by the current user. In this instance, the value of the global calc will depend on the value of the referenced field in the record in which that field has most recently been edited. When the global calc references multiple regular fields, its value will depend on the values in the instances of those fields located on the particular record where the most recently edited (by the current user) of any of those fields resides.
3. A global calc will NOT update if it references a global field that is located in another table, if that field is edited by the current user.
4. A global calc will NOT update if it references a global field (in the same table and referenced directly, or in another table) that is edited by different user (users see their own separate global values…).
5. A global calc will NOT update automatically if it references a regular field that is located in the same table (and referenced directly) when that field is edited on any record by another user.
6. A global calc will NOT update automatically if it references a regular field that is located in a related table (even if a self-relation) if that field is edited on any record by the current user or by another user.
7. If a global calc references one or more related fields (as per 3 and 6 above) and ALSO directly references a local field, either global or regular, the value of the global calc will depend on the related values which are current (for the current user) at the time when the local (to the table in which the global calc resides) value/s are edited.
8. The value of a global calc when a solution is opened remotely will be the value that it had on the host when last closed (sound familiar?!).
9. The values of global calcs in a hosted solution can be ‘tickled’ at login by changing a local field which they reference. Eg if there are several dozen global calcs with formulae constructed along the lines of:
If(not IsEmpty(GlobalsTable::RegularTriggerField); RelatedTable::DataField)
then they will all update to reflect the current (related) values at start-up if the start-up script includes the command:
Set Field [GlobalsTable::RegularTriggerField; “1”]
10. Changes made to referenced regular fields on another workstation will not appear in global calc results until a refresh event (eg as per 9 above) has occurred on the current workstation – eg the next time the start-up script runs. If there is no triggering mechanism (as per point 9) then the changes will not appear at all until the solution is taken offline, updated in a client session, closed and reopened on the server, as is the case with non-calc globals.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s