Easy Master-Detail in Filemaker 11 Using Filtered Portals

The Problem: Creating Master-Detail interface elements in Filemaker 10 and earlier was not straight forward.

Masster-Detail

You’d have to create a field to store the id of the currently selected record, then create a relationship matching just that id. If you’re in a multi-user setting you’d have to make sure the id storage field was global, so that selection was per user, not per record, otherwise you’d have the problem when one user changed the selection the selection would change for everyone.

The Solution: Now in Filemaker Pro 11 that all goes away with Filtered Portals.

Setting the global variable can use the same mechanism (onObjectEnter) on the portal. Remember though, in Filemaker Pro 11 you’ll need to add a refresh to update the portal.

Set Selected ID

Now all you have to do is set a script that sets a global variable, drop a relationship on the layout (potentially the same relationship you make the selection from) and filter it by the selected id.

Filtered Portal

Set the Calculation of the Filtered portal to match the selected ID with the record ID

Now you’ve got a simple interface that is easier to maintain and modify.

 

1 Response to “Easy Master-Detail in Filemaker 11 Using Filtered Portals”


  • Nice technique! This works fine when it’s a simple example, ie relating to one table occurrence only. When the selected record has other related data in other tables (ie selecting a customer and wanting to show invoices, correspondence, contacts etc), this method doesn’t work – you can’t put portals inside portals :(

Leave a Reply