Calculation fields let you tell FileMaker how to automatically update and validate the data in your database. But working with the database is still a manual affair. If you often need to print a summarized report, you have to perform a find, sort the records, switch layouts, print, and then switch back to the original layout manually. Once you’ve done it 27 times, you start wishing you could click a button and have the report print itself. Well, you can: Just tell FileMaker the same series of steps you’ve been doing over and over again, and attach the list to a button (Section 184.108.40.206). That’s the essence of scripting.
A script is a series of steps bundled together. When you run the script (by clicking a button, say), FileMaker carries out all the steps on your behalf, one after the other. Scripts can be simple—just the five steps necessary to print the report—or they can be much more complicated. Advanced scripts can even incorporate calculations (Chapter 9) to do different things in different situations by making simple decisions based on the data in your database, the current time or date, and so on.
To get a feel for how scripting works, you’ll create a really simple script. Suppose you want to find all invoices with a balance due and view them in a sorted list. ...