Portal: Moving to the next field of the same record

I have a portal with a pop-up to select a product. When modified this triggers a script that moves to the a particular field within the portal. Fine it this happens to be the top record, but not for others. How do I select this field of the same record I was working on.

NB. I do have the selected portal record's UUID copied to the parent record during the script but haven't worked out how to effectively use this to stay on the same record when I move field.

In your script use the Freeze Window step to keep you on the current parent record. Then have your script go to the layout of the related record and fill the particular field there and commit the related transaction. Then have your script return to the parent record.