Now that you know how to create scripts, 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.
Download sample databases for this chapter from this book’s Missing CD page at www.missingmanuals.com. Do the tutorials in the file called Invoices START.fp7. Use Invoices FINISHED.fp7 to compare your work, or if you want to check something as you work.
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 ...