This is a "feature" added with FileMaker 10 that many of us have complained about. It has its uses, but it needs to be something we can "turn off" so that it doesn't interfer with situations such as you describe.
One workaround provided by ULearnIT is to add a do nothing script that pauses. While the script is in the paused state, the auto-sort doesn't kick in and your records stay where they are. This is sometimes implemented with a button labeled "enter edit mode" that starts the script, disables user aborts, then pauses inside an infinite loop such as:
Allow User Abourt [off]
Then any button on this layout is set to use the Halt option in Button setup... or performs a script that ends in Halt Script in order to terminate this loop.
If you want to chime in on requesting a change in this feature: http://www.filemaker.com/company/feature_request.html
Thanks for your reply. The work-around is not ideal but at least it allows the users to see and "confirm" that the new record has been added. I will give it a try.
Also, have you ever run into the problem that the Scroll Window [to Selection] does not work?
I don't use that script step very often so I'm not a good person to ask that question.
I used the following workaround to solve the Scroll Window to selection problem. The solution will sort the found set if the FMpro version is 10 or 11. After the found set is sort, the new record is in the same position as it will be when FMPro automatically sort the found set after the script runs. I can get the correct Record Number of the new record and use the Go To Record script step to bring the new record to the screen.
Here are the steps I added to the end of my script.
Commit Records/Requests [ Skip data entry validation; No dialog ]
Set Variable [ $Version; Value:Filter ( Get ( ApplicationVersion ) ; "0123456789." ) ]
Set Variable [ $VersionNumber; Value:Left ( $Version ; ( Position ( $Version ; "." ; 1 ; 1 ) -1 ) ) ]
Set Variable [ $SortState; Value:Get ( SortState ) ]
If [ GetAsNumber ( $VersionNumber ) > 9 and GetAsNumber ( $SortState ) > 0 ]
Sort Records [ ]
[ No dialog ]
Set Variable [ $RecordNumber; Value:Get ( RecordNumber ) ]
Go to Record/Request/Page [ $RecordNumber ]
[ No dialog ]