Database Reference
In-Depth Information
Now your trigger is installed and ready to test.
To test things properly, go to the Invoices layout and then choose Records→Show All Re-
cords. Then switch to the “Invoices with Balance Due” layout. If all goes well, FileMaker
will find only the unpaid invoices and sort them for you.
Now that you're on the List layout, you can find again if you want to see different records, or
sort in a different way. As its name suggests, the OnLayoutEnter trigger fires only when you
first come to the layout from somewhere else.
Figure 11-20. The Layout Setup dialog box has a Script Triggers tab. From here, you can turn on
various triggers, pick which scripts run, and choose which modes the triggers apply to. You can
turn on as many triggers as you want, but each trigger can have only one script. If you need to run
more than one script for a trigger, just bundle them together in one script (using Perform Script
steps) and then select your new script.
File Option Triggers
File option triggers run when something happens to your database file, like opening or clos-
ing it. You can use a file trigger if you want to be greeted with the list of unpaid invoices first
thing every morning or see a list of open projects that need your attention. Or you could do
some database housecleaning when you close the last window for your database. This option
is a little less common, but it has its uses: For example, if you want to make sure other re-
lated files close whenever the main file closes (even if they have open windows), then you
Search WWH ::




Custom Search