The portal is auto-grouping
I have never seen this before.
Exactly what I was thinking when I read this…
What is 'auto-grouping' - and what object are you using as the button for your script?
Auto-grouping: If you select multiple fields and "group", this is what is happening when I use the
"portal" row as a button... without asking it to.
Actually I didn't "name" the portal and didn't use an actual "button", and didn't make any of the
portal fields "active" ( which I don't yet know how to do) but used the portal row itself.
Which now that I'm seeing it from a different perspective, as per your comments, I can see why it is doing this.
Which is also why it is always taking the first record only.
You can only define the entire portal as a button (which is rarely useful), not a specific row, and consequently GTRR will go to the first related record.
Since in FM13 portal rows can be treated as discrete objects for formatting purposes, maybe someday we'll be able to treat them as discrete button objects …
Until that day comes, use one field, or a group of fields, in the portal row as button; this puts you in the related record's context, so GTRR (or other script steps targeting a related record) will work as expected.
I never use fields or labels as buttons in portal rows just because of the "grouping" effect.
Create a BUTTON (make it plain with no fill or lines, if desired) and push it behind all the other objects. You can size it so that it just fits in the portal row. Attach the script to this button not to other objects.
You could make it fill conditionally, if you wish to make it a fill. But in that case, you may need to make a "text object" (one space character in a label) and resize to fit the row. Then attach the button to this one object (also pushed to back of the other objects in the row).
You now have discrete objects that can be edited without the "grouping".