To illustrate the solution, let's say you have two tables with a layout for each of the same name: Parent, Child.
In Parent, we'll just define two fields for this demo: ParentID, set up as an auto-entered serial number and SelectedChild as a number field.
In Child, we'll define these fields: ParentID (number field) , ChildID (auto-entered serial) , Name (Text) , LargeText (text)
For your portal, you'd have the following relationship:
Parent:: ParentID = Child:: ParentID
Now you can place a portal to child with Name in the portal row to display every record in Child with a ParentID number that matches the current record on the Parent Layout.
For your detail field we need an extra table occurrence of Child. In Manage | Database | Relationships, click Child to select it and then click the button with two plus signs to make a second table occurrence.
Define a second relation ship as: Parent::SelectedChild = Child 2::ChildID
Now you can place the LargeText field from Child 2 on your Parent layout.
GIve your button this script:
Set Field [Parent::SelectedChild ; Child::ChildID]
and you're done.
Worked beautifully. I have no idea why I could not wrap my brain around this problem as it seems so simple now!