Go to Layout
The "Go to Layout” script step was introduced on Creating Your Script. Its purpose is simple: Change layouts. It works just like making a choice from the Layout pop-up menu in the status area, except that the script can go to any layout (even if it doesn’t show in the menu).
“Go to Layout” has just one option, a pop-up menu labeled Specify. In addition to every layout in your database, this menu also has three special choices:
The original layout option causes FileMaker to switch to the layout your user was on when the script started. After all, you can run lots of scripts anywhere, especially if they’re on the Script menu. Since scripts often change layouts as they run, this option makes sure folks end up back where they started.
The Layout Name by calculation option lets you specify a typical FileMaker calculation. The result of the calculation must be text, and it should exactly match the name of one of the layouts in the database. When the script runs, FileMaker evaluates the calculation and switches to the layout with the correct name.
The Layout Number by calculation option is similar. You specify a calculation with a number result. FileMaker numbers every layout sequentially, in the order in which they’re listed in Layout mode. The result of the calculation determines which layout to visit by number.
Note
Layout numbers don’t necessarily correspond to their position in the Layout pop-up menu. Remember that not all layouts show in this list and you can reorder them ...