O'Reilly logo

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

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. Scripting Basics

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 (Running Scripts). 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 same five steps you'd go through if you printed a report manually. Or they can be much more complicated—and can handle tricky or tedious tasks you wouldn't want to do manually. Advanced scripts can even incorporate calculations (Part IV) to do different things in different situations by making simple decisions based on the data in your database, the current time or date, or any other condition you want to test.

Note

If you've worked with other scripting environments—like Visual Basic for Applications, AppleScript, or JavaScript—FileMaker's script-building tools are pleasantly familiar.

Your First Script

To get a feel for how scripting works, ...

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