Can you show a picture of your relationship graph, so we can see what and how the tables are related. Or post a sample file with a some records?
You'll probably end up needing another TO that matches Notes to Family members. In this second Notes portal would be a portal filter to only show the individual or all family members, based on a global check box, or button that toggles a global variable.
Sounds like you need a table of Families with one record to a family that then links to people. Might even need a join table if a People record can be a member of more than one family.
Using the existing pair of tables, you'd need a new relationship to a different occurrence of notes where you match records by the Family ID field instead of the people ID field. Since such a field doesn't exist in Notes most likely, you might do it this way:
People----<People by Family------<Notes by Family
People::familyID = People by Family::FamilyID
People by family::PeopleID = Notes by family::People ID
Then a portal to Notes by Family will show all notes for the same family as that of the current People record.
You could created a relationship between people and notes and match by family ID.
Then you can use a filter field to filter the portal rows.
I made a sample, to show how it could work.
Hope it helps.
Family.fmp12.zip 77.8 K
Let me think on these. All of them sound helpful. I have included a screenshot of my Relationship Graph. I should have been more careful with my fieldnames in my description above - I think I'm just braindead today. Family is Household and Individual is Person. Notes is Contacts. I'm sorry for the confusion.
I originally did a separate Family table, knowing that is better relational design. The problem is that I can't remember why I changed it I'm sure it was a great reason, though
I actually do save the Individual and Household keys to Contacts.
My challenge is not being able to build a portal to show every Person in the Household. It is making the portal dynamic and being able to switch between one Person's Contacts or the whole Household's Contacts.
1 of 1 people found this helpful
Then karina's method will work for you.
- Click on Contacts in your relationship graph
- Click the button with two plus signs to make a copy of it.
- Double click it to open a dialog where you can give it a better name than "contacts 2".
- Link it to Person only by HouseholdID rather than both fields.
- Add a portal to your tab control based on this new occurrence of contacts.
If that works for you, please mark karina's post as the correct answer. I'm just showing the steps on how to implement it.
And if contacts_household is an occurrence of contacts, you just need to use it as the table occurrence for your portal.
Yes, Karina's did it for me. It wasn't the relationships I was struggling with. It was my ignorance at being able to use something like a Case in the portal filter. I study code when I get stumped, but I've never run across that before in all my studies. Using that with a global opens up a whole new world!
Thanks to all!
An additional thank you, Karina, for providing (building?!) such a useful example. That was way more than I could have hoped for!
Yes, I build the sample.
Sometime's it works better for me to work with a sample.
I'm not native English, so when I post a message to try to explain a possible solution sometimes I'll build a sample to to make thing more clear and hope they help with solving the problem.
thanks for showing whardy7 the steps to implement it in his solution.