Database Reference
In-Depth Information
Figure 11-22. The Layout Setup dialog box has a panel for attaching script triggers to a layout.
Here a sort script will be run each time this layout is entered. More than one layout trigger can be
attached to each layout. When you're in Layout mode, a small script trigger badge appears at the
bottom-right corner of each layout that has one or more triggers attached. Control script trigger
badge display with View→Show→Script Triggers.
OnRecordCommit
OnRecordCommit works in Browse and Find modes. When you commit a record, the trigger
fires. It doesn't matter how you commit (by clicking out of the record, switching layouts, or
running a script, for instance). In each case, if this trigger is turned on, then the script runs.
Even though the trigger is called OnRecordCommit it actually fires after you make the action
that would normally commit the record but before FileMaker commits it.
That means the script that's triggered can cancel the commit operation by returning a False
value in an Exit Script step. If you cancel the commit, then you don't leave the record, and
FileMaker doesn't save your changes. You can use this power to force the person using the
database to make some kind of change to a record before saving, or require some kind of ex-
tra confirmation.
Search WWH ::




Custom Search