Chapter 12. Exploring Script Steps

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, and working with windows and files; and printing. This chapter is a compendium of steps—and boatloads of scripting possibilities.

Note

Download sample databases for this chapter from this book’s Missing CD page at www.missingmanuals.com/fmp12mm. Do the tutorials in the file called Invoices START.fp12. Use Invoices FINISHED.fp12 to compare your work, or if you want to check something as you work.

Go to Layout

You learned about the “Go to Layout” script step in the previous 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 tells FileMaker to switch back to the layout that was active when the script started. After all, you can run lots of scripts anywhere, especially if they’re on the Script ...

Get FileMaker Pro 12: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.