Ok that makes more sense: I'll give it a try. We have spent many happy weeks in the San Juans, and close friends in Redmond.
Wonderful country out there. I am in NH, also beautiful! Thanks, John From: FileMaker Pro Discussions [mailto:[email protected]] On Behalf Of John Weinshel Sent: Sunday, December 14, 2008 4:14 PM To: [email protected] Subject: Re: 3 level relationship No, it was clear that Role is a separate table. What I am still not following is where you want this portal. Do you want one portal to show the Persons for the Household, and another portal, perhaps on a second tab of the tab control, to show the Roles for a selected person? Or are you trying to show all the information in one portal? If the former, then the second portal, be it on the same tab as the portal showing the Persons or its own tab, would display a relationship from a global field (the ID of the selected Person) to their Roles. Place a button, on something like the Person's 'Name' field in the first portal, that sets that global field to the child record's ID. The 'child record' is the Person, displayed in the first portal. If the second portal does indeed display the relationship I described (from the global ID to the Person ID in Roles), then the second portal will correctly display the selected Person's Roles. If you also want to put that second portal on its own tab, then you will need to add a GoToObject[] script step to what will now be a script, rather than a simple SetField[] step, triggered by the button, where the 'object' is the name of the tab. Tabs can be named with the Object Info palette. John Weinshel Datagrace Vashon Island, WA (206) 463-1634 Member, FileMaker Business Alliance Certified For FileMaker 8 Certified For FileMaker 7 _____ From: FileMaker Pro Discussions [mailto:[email protected]] On Behalf Of Ron Sent: Sunday, December 14, 2008 12:57 PM To: [email protected] Subject: Re: 3 level relationship Sorry, I guess I did not fully explain: the "Role" for each person is another table with details particular to that role. Therefore I need a portal for all of the role tables for the one person: this is under a Tab control. Ron From: FileMaker Pro Discussions [mailto:[email protected]] On Behalf Of John Weinshel Sent: Sunday, December 14, 2008 3:44 PM To: [email protected] Subject: Re: 3 level relationship Sounds like you have one TO from Household to Person, and another from Person to Role. If so, then, in a portal displaying the first relationship (Household to Person), you can also show the two-hop relationship, i.e., Household to Role, via Person. If you just put the related Role field in the portal row, you will, of course, see only the first role for that person. While it's true you cannot put a portal inside another portal, you can create calculated fields returning lists, and put those in the portal row. Simplest would be: List(Relationship_To_Role_From_Person::Role) There are a variety of ways to display a list in a single line portal row: tooltip is the easiest, but they disappear after a few seconds. Another is a popout window (a second window that appears when you click on the field). Another variation is to use portal rows that are taller than one line, but that will always require a best guess about how many Roles are likely to need to be displayed. If you are uncertain about how to capture the appropiate ID from a portal row, just remember to grab that ID immediately, while the portal row has focus. You might, for instance, place a button on the appropriate field that sets a variable to the ID of the child record. From there, you can do whatever you want. A global field will also work, but script variables execute more quickly, although they cannot be used for relationship keys. John Weinshel Datagrace Vashon Island, WA (206) 463-1634 Member, FileMaker Business Alliance Certified For FileMaker 8 Certified For FileMaker 7 _____ From: FileMaker Pro Discussions [mailto:[email protected]] On Behalf Of Ron Sent: Sunday, December 14, 2008 12:19 PM To: [email protected] Subject: 3 level relationship I had given up on this but realize that I shouldn't. I have a 3 level relationship that I am having trouble implementing in a layout: 1. Household (addresses, phone, family name etc.) 2. One or more Persons in each Household (individual name, separate e-mail, phones, etc.) 3. One or more roles that a person may play in the organization: Musician, Teacher, Donor, Performer, Volunteer etc. I have a portal for the person(s) I have a portal with a tab control for the various roles for one person. My problem would be resolved by a portal within a portal but that is not allowed: that is, I want to be able to select a Person and have the Portal with the roles oriented to the person I selected. Any suggestions? Many thanks to you all! Ron Carr
