Make sure that both layouts are open in the same window and that both layouts refer to the same table occurrence in Layout Setup | Show Records From.
Both layouts will then share the same found set, current record and Sort Order.
There are also ways to "clone" the current found set when opening a new window or changing to a layout based on a different occurrence of the same window via a fairly undocumented use of Go To Related Records.
I have checked and it appears both layouts do refer to the same table occurrence in Layout Setup see screenshots.
when the extended script is activated a different set of records are still displayed.
and the original layout ---
result from original script ---
and the result when directing to the new layout via extended script ---
I can see in your screen shots that both layouts have layout level script triggers defined that perform scripts. Any time you manually change layouts or a script uses Go to Layout to change to these layouts, that script trigger will be tripped and the associated script will be performed. Thus, this other script might be altering your found set when you change layouts.
You may need to keep that script from performing when you make this change in layouts.
That's it !!
I took out the tick in associated script which then took away the "red star" on the manage layout list.
All now works
well done and many thanks
Screen shot of a layout with a red star --
And after without the "red star" all works
But there are times when you need such script triggers. Here's what to do to keep a trigger performed script from interfering when another script trips it.
Take your trigger controlled scripts and modify them to fit this pattern:
If [ Not $$TriggersOff ]
Original Script steps go here
Then, when you need a script to disable the trigger performed scripts do this:
Set Variable [$$TriggersOff ; Value: True ]
Go to Layout
Set Variable [$$TriggersOff ; Value: False ]
Just make sure that any script that disables script triggers in this fashion also re-enables them before they quit.
Yes I see why this is necessary and will modify to suit