For starters, FileMaker won't allow you to have a portal inside of a portal. If this is what you need, you have to use a different structure such as synchronized general and detail portals.
With such synched portals, portal one shows your portal 1 records and portal 2 shows the portal 2 records for a selected portal row in Portal 1. Clicking a button in Portal 1 triggers a script that updates portal 2 to show the correct subset of records.
I'm not sure I completly understand?
is there anyway you can create an example for me to follow?
Let's say you have this structure to your relationships:
Parent::PK = Child::FK
Child::PK = GrandChild::FK
You can put a portal to Child on a Parent layout, but you can't put a portal to GrandChild inside that portal.
You can add a table occurrence to GrandChild and define a global field in Parent to look like this:
Parent::gSelectedGrandChild = SelectedGrandChild::FK
Then you write a script that you attach to a button (or define the entire portal row as a button) that does this:
Set Field [Parent::gSelectedGrandChild ; Child::PK ]
Now a portal to SelectedGrandChild will display the grand children records for any child record you select in the portal by clicking the button in the portal row.
You can also avoid the extra table occurrence and relationship in FileMaker 11 by basing a portal filter on a Global variable that you update instead of the global field. It takes an extra script step but avoids complicating your relationship graph.
Set Variable [$$GrandChild ; Value: Child::PK ]
Refresh Window [Flush cached join results ]
and base your portal directly on GrandChild with this as the portal filter:
$$GrandChild = GrandChild::FK
In either case, you can use conditional formatting to highlight the selected Child row to tell the user which child record has been selected.
I would like to know if you could make this a bit more clear. I was trying to achieve something similar to what Andy wanted. Here is my idea:
1) i want to create records for different TRIPS. Each trip consists of several DAYS. Inside each day of the trip are records related to each DAY, like: TRANSPORT, BAGGAGE, COMMUNICATION, FOOD. Which of course happen different for every new day.
Since each trip has many days, and each day has many transports, bags, communication and food records I thought it best to create seperate tables.
My idea was to make a TRIP-layout. add a DAYS-portal so i can add as many days to each trip with the basic info for each trip and every of the related days.
Then if I wanted to add to each DAY the many different records for TRANSPORT, BAGGAGE, COMMUNICATION, FOOD, that was supposed to be done by more portals of them inside the DAYS portal. The reason was that I do not want to leave the DAYS portal or in fact the TRIPS layout to add as many TRANSPORT, BAGGAGE, COMMUNICATION, FOOD records to every DAY. But i also do not know how many of the Grand-Child records i need for Each DAY (Child-record).
I understand that its not possible to add a portal into another portal, which i thought would have been the easiest way to do this.
I see your post above, but was wondering if you could make it more clear on how it is supposed to work.
Maybe this can easily be achieved also in a completely different approach?
Your situation is definitely more complex than the OP. You also do not indicate whether you are using FileMaker 11 or an earlier version of the software--and thus I don't know if you can use a filtered portal or not.
Even though a database text book may tell you to put Transport, Baggage, Communication and Food data in separate tables if the data recorded for each is markedly different for each, it will be easier in FileMaker if you can put all that data in the same table, but use different subsets of the fields defined for each record as necessary for each type of trip detail.
If you decide to keep the data in separate tables, you can place a separate detail portal for each such table. To make the layout easier to manage, you can place each such portal inside a different tab of a tab control if you wish.
i just kind of saw this post again and even though i fixed the issue i had last time in a simpler way by putting all records in the same table it wasn't satisfying. and surely enough i have come across the same kind of problem again. I think i would like to really understand it better.
first of all: i use FileMaker 11 Pro
Lets say i have the following situation:
[A] "Suppliers" >----< [B] "Check-Points" >----< [C] "Details for checkpoints" (but mostly specific for each supplier) (*inside "" are corresponding Layouts.)
So i solved the the many-to-many relation ship between [A] and [B] by using a joint table [AB].
Now it looks like this:
[A] "Suppliers" ----< [AB] >---- [B] "Check-Points" >----< [C] "Details for checkpoints" (but mostly specific for each supplier)
added a portal for [AB] on the "Supplier" - Layout and i can add all kinds of Check-Point items and link to each supplier.
But now i would like to add to EACH of the Portal Lines from [AB] a more detailed specification from Table [C].
I tried adding another portal on "Supplier" - Layout, but as already discussed before that didn't get the proper result.
So i tried creating another Joint table lets call it [BC] and a new layout "Lines for Details"
Now it looks like this:
[A] "Suppliers" ----< [AB] >---- [B] "Check-Points" ----< [BC] >---- [C] "Details for checkpoints" (but mostly specific for each supplier)
Then i added a button that takes me to the current related record from [AB] to the new "Lines for Details" of [BC] where i can now specify this more.
However, this is very confusing for anyone but me and i feel there must be a better way. in fact in your post (from: posted November 16, 2010 by PhilModJunk) i think you did describe just what to do, but i reallydon't understand it. would you be so kind and re-explain it one more time in my example.