Ditch those Flush Caches, Use Cartesian Join Instead!
REFRESHING RESULTS through a relationship in FileMaker can sometimes be frustrating. You will need to find a way to nudge the related records in order to get the updated results you need to show. Daniel Wood tackles this issues and developed a way to fix it: Cartesion Joins!
The refresh problem arises because the relationship is unaware of its own need to refresh the results. The trick here is to tell the relationship that it should refresh itself.
Relationships will re-evaluate themselves if one or more fields on the source side of the relationship change explicitly. However, we know that any field put on the source side of a relationship will actually affect the results of that relationship.
The exception here is a cartesian join.
Cartesian join predicates, by definition, find ALL records through a relationship…
Here lies the key in this technique. The above relationship uses a standard “=” predicate, AND a cartesian join predicate. The result of this relationship? All active contacts. The cartesian has no effect on the relationship, EXCEPT as a means to refresh it.
We have managed to add a field into the relationship, which has no detrimental effect on the relationship, does not affect the relationships intended results, but is a field nonetheless which we can use to refresh the relationship.
You’ll need to read the whole thing, and download the sample files. It’s worth it.
More…Ditch those Flush Caches, Use Cartesian Join Instead!.
James Bardwell
June 17, 2014 @ 1:04 pm
Donald, doesn’t FM 13’s “Refresh Object” script step help to address the need to refresh a named portal?
Don Clark
June 18, 2014 @ 5:01 am
Hi James-
Yes, it does:
If the specified object is in a portal, Refresh Object updates the object in every visible portal row.
Find out more about it here.
Don