AnsweredAssumed Answered

Filter Portal Records Based on Found Set

Question asked by rmittelman on Mar 4, 2014
Latest reply on Mar 14, 2014 by rmittelman

My solution is based on the Contacts starter solution. I have a Contacts table, and a Communications table. On my Contacts Detail layout, there is a portal to the Communications table. The relationship is Contacts::Contact ID = Communications::Contact ID. Communications table also has a Comm Type field, where 1 = Phone number and 2 = Email.

 

So the portal is filtered by Comm Type = 2, because it's an emails portal. So far, everything works ok. While displaying a contact record, it shows all of his/her email addresses.

 

Now I want to add a different portal, on the Contacts list form, so when I click the "Email" button (a popover button), it opens a popover with a portal which will show ALL emails for ALL contacts.

I hope I did this right: I created a new table relationship between Contacts and Communications, this time with cartesian join. I based the new portal on this new table instance. I filter the portal with Comm Type = 2, just like the original portal. But since it's cartesian, it shows all emails. This is good.

 

So here's the challenge: My Contacts listing layout can itself be filtered, showing all contacts, or filtering them by various criteria. When I filter them to get a small found set, I would like the new portal to only show records from that found set, not the entire contacts table. The question is, how do you filter on the found set? Instead of "Comm Type = 2" I want something like "Comm Type = 2 AND Contact ID in <found set>"

 

Is there a way to do this in FMP? Thanks in advance...

Outcomes