Check the name of the specified table occurrence in layout setup for both layouts. (Show records from...).
I suspect that each layout is based on a different occurrence of the same table.
PS. you might consider staying on the same layout and in the same window by making Open Case a popover button that displays your "detail view" of the data.
Each layout is using the same occurrence
Do you have any OnRecordLoad, OnLayoutExit or OnLayoutEnter script triggers set on either of the two layouts?
OnRecordload will be tripped when you open the new window. It will be tripped again when the script changes layout.
And the layout change can trip the other two triggers.
No. the list view layout only has a script that runs to find and sort records.
and what trigger performs it?
That sounds exactly like the type of script to cause a problem here.
The script just finds and sorts on the List view layout. There are no triggers on the Form view layout.
And that's the source of your trouble.
When you open the new window, you open it to the list view layout and this trips the onLayoutEnter trigger on that layout.
One way to prevent trigger performed scripts from doing anything is to put this at the beginning of the script:
If [ $$TriggersOff]
Then, in any script that might trip script triggers that you do not want tripped, do this:
Set Variable [$$TriggersOff ; Value: True ]
New Window [....
just be sure to include a step to set the variable to either "" or False before the script exits so that other actions that you want to trip triggers can do so.
Ah--you are correct. And in my other database, the script fires from a button that opens the list view layout so that's why I didn't encounter this issue there.
Thank you SO much (as usual)!