Now that you know how to create scripts (you did read the previous chapter, didn’t you?), it’s time to expand your repertoire. FileMaker has a script step for just about everything you can do from the menus and Status toolbar. You can use any combination of these steps with script techniques like looping, branching, custom dialog boxes, and more to automate just about anything FileMaker can do. Major areas of scripting include working with field data and records, finding, sorting, working with windows and files, and printing. This chapter is a compendium of steps—and boatloads of scripting possibilities.
The “Go to Layout” script step was introduced in the last chapter. Its purpose is simple: Change layouts. It works just like making a choice from the Layout bar’s Layout pop-up menu, 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 someone 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 ...