Database Reference
In-Depth Information
Script Triggers
Scripts are all about saving you (and your users) time. And what could be less time consum-
ing than something you don't have to do at all? As you learned earlier in this chapter, script
triggers let you tell FileMaker to run a script automatically in response to something that
already happens when people use your database. You'll get a brief introduction to each of
FileMaker's trigger options here. Then, throughout the next chapters, you'll use these trig-
gers in key places to make your database come alive. You can set up script triggers to run
when you:
▪ Open or close your database
▪ View, commit, or revert a record
▪ Press a key on the keyboard when you're on a particular layout
▪ Switch to a particular layout
▪ Switch away from a particular layout
▪ Switch to or from Browse, Find, or Preview modes
▪ Switch to or from Detail, List, or Table views
▪ Enter an object (click or tab into a field, or highlight a tab panel or button with the Tab
key)
▪ Exit a field that has Field Validation options
▪ Press a key on the keyboard while in a field, or while a button or tab is selected
▪ Change the contents of a field in any way
▪ Switch from one tab panel to another
▪ Leave a field or tab away from a button or tab panel
▪ Leave a field after you've made changes to it (in other words, when FileMaker has to
save changes to the field).
Script triggers come in three flavors:
File triggers apply to the database file. They run when you open or close the file or
when you open or close a window.
Layout triggers apply to specific layouts. These triggers include actions like loading or
committing a record, switching layouts, or pressing a key on the keyboard.
Search WWH ::




Custom Search