You cannot place a portal inside a portal in FileMaker. That option won't work.
What you can set up are synchronized MainRecord - DetailRecord portals. When you click a row (or a button in the portal row) in the MainRecord portal, it Highlights via a conditional format and a script pulls up the matching detail records in a second portal. In FileMaker 11, this approach can be done with a portal filter.
In older versions, this can be done with a "filtered relationship" where the script modifies a field in the parent record to control which "detail" records appear in the portal.
Didn´t get it, how would i acomplish that, if you could please be more specefic, thanks again!
I didn't get more specific as the explanation is fairly long. I'd prefer not to post two long descriptions of this approach--one for Filemaker 11 users and one for older versions.
Which version of FileMaker are you using?
Im using FIlemaker 11
Good, that's the simpler example to give.
Let's assume you have these three tables and relationships:
Master, Child, ChildDetail.
Master::MasterID = Child::MasterID
Child::ChildID = ChildDetail::ChildID
On a Master based layout, add portals to Child and ChildDetail. Define this Portal Filter for ChildDetail:
$$ChildID = ChildDetail::ChildID
Write this script:
Set variable [$$ChildID ; Value: Child::ChildID ]
Refresh Window [Flush cached join results]
Attach this script to either a button located in the Child Portal row or you can select all the portal row fields and use Button setup to turn the entire row into a button that performs the above script. (The second option allows you to just click a portal row to select the detail records in ChildDetail, but you can no longer edit the fields by clicking into them so use the option that works best for your layout needs here.)
Now one last detail. You can set a conditional format on all the fields inthe Child portal row with an expression like this:
$$ChildID = Child::childID
And specify a a light pastel fill color to "highlight" the currently selected portal row in the Child Portal to make it easier to see to which Child records, the currently visible ChildDetail records belong. (You can also specify a bold text style and/or a different text color.)