In Filemaker, context is everything. In order to successfully execute many commands proper context must be established and you need to understand your execution context to properly program your application.
At present, the way to do this is to use a GTL command to change to a different layout with the proper context that you need. While this is a simple process, it can have many undesirable effects (script triggers, forced commit, screen updates if not frozen, etc).
I propose a new script command "Set Context" to allow the switching of context during a script to a different TO. This can significantly simplify programming, as well as avoiding some of the issues involved with changing layouts, the script would simply continue execution but with a new context.
As part of this new script step we would need it to be set "by Calculation", "select from a list of TOs", "original context (similar to GTL)"