I have a similar setup that replicates the tabs (it used to be tabs) but is now actually a different layout per "tab". I think the theory would work either way
When a user clicks to swap the tab, there is a script that fires that records
Set Variable $$CurrentRow = Get (ActivePortalRowNumber)
as well as the active portal name
Then when you click back to the first tab from the second, it does a Go to Object (portal name) and then
go to portal row [select; no dialog; $$currentRow]
Have you considered putting both portals side by side on the same tab? The selector portal can be a long list with only a single row of detail visible for each, the row itself set as a script which highlights the selected row and posts that row to a detail global field that controls the details portal. This can be a much larger, one row portal that can show all the detail fields you need. It seems to me this would be simpler than switching tabs. As an alternative, the detail portal could also be placed on a popover.