O'Reilly logo

FileMaker Pro 10: The Missing Manual by Geoff Coffey, Susan Prosser

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Understanding Scripts

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, then 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 (Creating Buttons with the Button Tool). That’s the essence of scripting.

A script is a series of steps bundled together. When a script runs, FileMaker carries out all the steps on your behalf, one after the other. You can create a script to automate almost any routine task, and then give it a name so you can easily call it up and repeat the steps later with just a click or two.

You can run a script by selecting it from the Scripts menu. But more typically, you put a button on a layout somewhere, and have FileMaker run your script when someone clicks the button. You can even use script triggers to make scripts run automatically in response to what someone does. For instance, you can make a script run every time someone goes to a particular layout, clicks into a certain field, or selects a tab panel in a tab control. Using the “Install OnTimer Script” script step, you can make a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required