Caution When Using Script Triggers

There has been a lot of excitement — most of it warranted — over the advent of Script Triggers in FileMaker. This functionality was prominently featured at this year’s DevCon, particularly in a couple of sessions that discussed the “new idiom” of FileMaker. The concept is about breaking out of our old habits and using new tools (such as Script Triggers) to accomplish more user-oriented applications.

To paraphrase the late, great Michael Crichton, though (R.I.P., and thanks for Jurassic Park): just because you can do something doesn’t mean you should.

One of our teams is currently helping to overhaul a database built by another FM consulting company that employed script triggers extensively. They’ve stripped out all of the script trigger functionality because of poor implementation. One problem was that the combination of script triggers and field validation would leave users in frustrating dead-end loops of tabs and custom dialogs.

Lesson: Be cautious with the shiny new toy! Script Triggers are interesting, useful and powerful, but they are also a potential rat’s nest in the making.

Also keep in mind that any extra fluff added to an interface requires more time for writing specs, for development, and for testing. Another of our teams is implementing a new solution in FM10, from the ground up. We’re trying to maintain caution while still using the new tools when appropriate. So far, we’re using script triggers for the following uses:

  • Instant picker filters (perform the filtering find after every keystroke in the search field)
  • Field formatting (phones) on data entry
  • Some button replacements for a cleaner interface (click the field to call the altering script rather than click a button next to the field)
  • Better user experience with portal updating (refresh window and flush cached join results)

So far, so good, but we’ll have to remember to test everything forwards, backwards and upside-down (as per usual, really). Please feel free to comment with any additional tips for maintaining clear Script Trigger ground rules.

Leave a Comment

Your email address will not be published. Required fields are marked *

Are You Using FileMaker to Its Full Potential?

Claris FileMaker 2023 logo
Scroll to Top