"Then close the window"
Are you sorting on layout 1 and layout 2 in the same window and then closing it?
Are you connecting to a database hosted over the network by either FileMaker Pro or FileMaker Server?
Do layout 1 and layout 2 refer to different table occurrences? (Table occurrences are the "boxes" shown in Manage | Database | Relationships.)
I am local. Using FM Pro Adv 11.
Layout 1 uses table 1.
Layout 2 uses table 2.
That rules out a few of the most likely explanations.
What exactly did you mean by the phrase "close the window"? This could be a key factor here as each window to a file that is opened has it own group of found sets, current records and sort orders. If you open a new window, sort your records and then close it. The sort order of the layout in the original window will not be changed.
Other possible factors:
- Any script that sorts or performs a find on a layout that refers to the same table occurrence as layout 1 will also modify the found set, current record and sort order shown on layout 1.
- Any script triggers that perform a script that modifies the sort order for this layout's table occurrence, might be triggered at times you didn't expect.
- Go To Related Records can modify the sort order if the relationship specifies a sort order and the GTRR step specifies layout 1 or another layout that refers to the same table occurrence.
That the answere. Colsing the window would have done it. Your reply help's me understand FM better.