1 Reply Latest reply on Nov 19, 2012 11:12 AM by philmodjunk

    Displaying fields from different related tables within the same portal.

    ALB

      Title

      Displaying fields from different related tables within the same portal.

      Post

           I am new to FileMaker and I'm hoping this will be a simple problem to solve. I have a series of nested one-to-many relationships, and I am having trouble when displaying information from different related tables within the same portal. I have re-created my problem using modified field names to make it easier to understand (using tables named Family>Parent>Child>Grandchild). When I create a portal in the "Family" table and specify that it should show related records from the "Parent" table, it of course only has one row per each of the three "Parent" records, and only the first "Child" and "Grandchild" related to each parent record are displayed (but the ID numbers all match appropriately). If I instead select the portal to show related records from the "Grandchild" table, it appropriately has a row for each grandchild record but for some reason all of the Parent IDs show the same value (ID#1) instead of the correct Parent ID that actually corresponds with each individual Grandchild record (in the attached file, compare Parent IDs from the "Grandchild" table to the "Parent" table and to the graphical hierarchy I have drawn at the bottom). How can I fix this so that the Parent column accurately displays parent IDs #1-3 (respectively corresponding to Children 1-2, Children 3-4, and Children 5-6, etc.)? I am using FileMaker Pro 11.0v4. Thanks!

      Problem_example.jpg

        • 1. Re: Displaying fields from different related tables within the same portal.
          philmodjunk

               To translate your relationships into a notation that I prefer to use, you have:

               Family-----<Parent----<Child----<GrandChild    (----< means "one to many" )

               What you have encountered is the fact that fields in a portal evaluate first from the context of the layout's table occurrence and then works down from there to the portal. Thus the fields from Parent all show the first related Parent record---just as though you didn't place this field in the portal at all.

               Solution:

               Create a new occurrence of Parent by selecting it in Manage | Database | Relationships and clicking the duplicate button. (Two green plus signs)

               Do the same to create a new occurrence of GrandChild. Then link them to Grand child like this:

               Family-----<Parent----<Child----<GrandChild>-----Child 2>------Parent 2

               Link them with the same match fields as you have defined in your original relationships.

               If you then refer to fields from Child 2 and Parent 2 in your portal to GrandChild, you'll see the correct values appear in the portal.