Database Reference
In-Depth Information
OnWindowClose is cancelable; you can use an Exit Script step to check a condition that,
when false, will keep the window from closing.
OnWindowClose runs even when the database stays open, as when another file is related to it
and needs access to its data. You can use this trigger in combination with OnLastWin-
dowClose . In that case OnWindowClose runs, and when it's finished, OnLastWindowClose
runs.
Layout Triggers
As you saw in the previous section, you configure layout triggers in the Layout Setup dialog
box (Layouts→Layout Setup), in the Script Triggers tab ( Figure 11-22 ). Layout triggers are
performed when an action takes place that concerns a layout itself. For example, each time a
new record is viewed, that's considered a layout trigger. That makes sense, given that the lay-
out is FileMaker's method of showing you a specific record. When you think about it, you
can see that the same trigger, running the very same script, can behave slightly differently de-
pending on whether it's run on a Detail or a List type layout. Triggers can fire before their
action or afterward.
OnRecordLoad
The OnRecordLoad trigger fires when a record is loaded . In other words, when you first visit
a layout, switch to a new record, make a new record, or perform a find, a record is loaded.
This trigger fires after the record is loaded and works in Browse and Find modes. You'll use
this trigger in the next chapter to automatically sort a set of records. But it can also be used in
tightly controlled databases where data is checked before you let a user view or edit it.
Search WWH ::




Custom Search