This is a reviewed/simplified version of my older post https://community.filemaker.com/thread/103206
But the issue I describe is the same and is still there.
Whenever (almost always...) I close the last window of a file its found set and its sort order are lost.
That is, when I open again that file its window shows an older found set and an older sort order, both older than those visible at closing time.
I think this very inconvenient since I'd expect to find the same window that I left before closing, including found set and sort order.
How to reproduce the problem:
You can easily reproduce this issue:
1. create a very simple and small test file with 3-4 records of only a couple fields
2. make some changes on the found set (e.g. omit some records) and/or the sort order - remember the situation before closing
3. close the file
4. open the file again - and compare what you see with what you left before closing: they are usually different
Originally I thought this had to do with the affected file being related to some other file (see my description in the old post above, actually a bit too complicated...) and at that time it seemed that closing all related files would instead preserve found set and sort order. But making additional tests I found out that this is not always true, and this behavior is 90% likely to occur independent from any existing relationship.
Is there a workaround ?
Note: I tried to use script steps Save Record/Request and Window Update with data flashing. If it had worked I could have used them in a OnWindow Close or OnLastWindow Close triggers. But those script steps don't do the job; it seems they commit only data values, not their presentation in the window.