One other thing I did not mention. I am using the same tables and relationships on another layout (for Events) and on that layout the GTRR works as expected. The layouts have only minor differences. They both run a script to bypass the record commit script and then contain the GTRR script step.
The GTRR step with ONLY RELATED RECORDS option still takes to to ALL of the related records, not just the one you clicked on. However, the one you clicked on should be the active record if you are in list view, assuming the button was fully within the portal row of that record on the starting layout.
Unchecking the ONLY RELATED will take you to a set of all records, not just the related ones, but, again, should leave you on the active record for the row you picked.
HOWEVER!!! If you are using a Commit Records step, you may be effectively losing the focus of the portal record on which you clicked. If you want to do that but still control the record on which you land, you can set a variable to the ID of the record in the portal while in the script (BEFORE the commit step so you have focus on the target record), then, after the GTRR on the new layout, go to first record, then loop going to next record with an exit loop option at the top of the loop to exit the loop if the $variable matches the record ID. This will stop you on the intended record.
Thanks Stephen. Your 'HOWEVER' solved the problem. As you suggested, the reason that all of the contact records related to the Task were in the found set instead of the one related to the Task Personnel portal record was that I always set a flag in the Task record to force a commit. And as you pointed out, I lost focus on the portal target record.
On the Events layout, where I thought things worked as expected, I did not force a commit of the Event parent record so I did not lose focus of the portal target record. However if I did update the Event record, it forced a commit and the found set of contacts again resulted in the records related to the Event parent record and not the Task Personnel portal record.
Again, thanks for your help in solving my conundrum. I could have spent a very long time trying to figure this out.
I could have spent a very long time trying to figure this out.
I know I spent a long time on it when it first bit me. Some script steps just seem to surprize us by not doing what we want.