Level: Intermediate, Version: FM 13 or later

Global Multiline Key As Relational Predicate

This is a quick follow up to my previous article on using a Summary List field as a relational predicate, and transferring a found set from table A to the corresponding found set in table B across that relationship via the Go To Related Record (current record) script step.

To avoid needless repetition, I will assume the reader has read that article. As discussed in the comments section (thank you Mardi Kennedy and Jerry Salem), there is a tried and true method for going to a found set of related records that has worked since FileMaker Pro 3 was released in December 1995:

  1. Define a global text field
  2. Link this field relationally to the primary key field of another table
  3. Populate the global text field with a list of keys
  4. Go to related records (a.k.a. GTRR)

2-17-2015 9-30-13 AM

Thanks to the new-in-13 summary list field type, building the list of keys is a piece of cake, as you can see in today’s demo, FM13 Global Multiline Key As Relational Predicate.

Given that there are fewer moving parts in the Summary List As Relational Predicate demo from last time, why bother with this method?

  • it doesn’t rely on a hack to create the relationship
  • it’s just as fast
  • it only has one more moving part and is just as easy to implement

To elaborate a bit on this “moving parts” business, the Summary List As Relational Predicate demo utilizes:

  1. a summary list field
  2. a Refresh Window (Flush Cached Join Results) step
  3. a Go To Related Record step

…whereas today’s Global Multiline Key As Relational Predicate demo requires:

  1. a summary list field
  2. a global text field
  3. a Set Field step
  4. a Go To Related Record step

At first it was not obvious that step 2 (Refresh Window + Flush Cached Join Results) in the Summary List As Relational Predicate demo was necessary, but testing and discussion with Rob Russell convinced me that it is indeed necessary for the technique to work reliably. (It might work many times without failing, but will fail eventually if the cache is not flushed.)

3 thoughts on “Global Multiline Key As Relational Predicate”

  1. I am particularly interested in the insight that a Refresh Window is necessary. This would explain why I experience the occasional ‘fail’, that is observable in the data viewer, in scripts that otherwise work perfectly over and over. Even still, the Refresh Window always seems a bit brutal. Is there any chance that a Refresh Object might work just as well?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.