Excelisys Custom Database eX Cetera Blog

As-You-Type Search Filtering using Script Triggers

March 16th, 2009

Check out the new “Tips-n-Trick” file just posted to the “Downloads” section of our web site, contributed by Mike Duncan, Lead Developer at Excelisys, Inc.

FileMaker Pro 10 introduced native script triggers as a tool for developers to utilize in their solutions. This example demonstrates the usage of a search filter, which many FileMaker developers are familiar with in complex portal filtering solutions. Now, with the use of script triggers, it is simple enough to implement the same functionality but you are not restricted to displaying results in a portal, and therefore have much more flexibility in the interface. Instead of being required to set a complex key that drives a relationship, your search script can be as simple or exotic as your solution requires. One key difference available in FileMaker Pro 10 is that you no longer need to wait for a field to be exited in order to trigger an action, allowing interaction between the user and database not available before without the use of third party plug-ins.

This example is a simple implementation of script triggers by using the OnObjectModify trigger set on the global fields that are being used to provide search criteria on the sample data. As the user types search criteria, a search script gets run, narrowing the search results in real time. Also used in this demo is the new functionality to set a field by name. This is used to allow the user to select a field to search on, which is used to set the field by name that is searched. This sounds simple enough, and displaces the need for large, complex branching “if” statements in a script editor that might have duplicated this functionality in previous versions of FileMaker.

Since these fields wouldn’t be applicable in Find Mode, we also set an object with text that displays only when you are in Find Mode that alerts the user to this fact as a reminder, as well as graying out the filter fields. This is done using conditional formatting to change the appearance of text and layout objects that are dependent on the current mode.

Script Triggers in FileMaker Pro 10 are an absolute game changer for developer in what they can accomplish. Hopefully this example provides a small peek at the potential that this new functionality provides.

Special thanks to Brian Dunning for providing the sample data used in this demonstration that is available at http://www.briandunning.com/sample-data/

One Response to “As-You-Type Search Filtering using Script Triggers”

  1. Dan Weiss says:

    Guys – This is an AWESOME use of script triggers – I’m using it in a solution instead of long value lists and the client loves it!

Leave a Reply


Excelisys

Explore the eX Cetera Blog


Services Database Development
& Consulting

Web Site / Applications
Commercialware
Custom vs Commercial
The Development Process
Custom FileMaker Applications
FileMaker Consultants
FileMaker Consulting
FileMaker Developer
FileMaker Development
FileMaker Experts
FileMaker Help and Support
FileMaker Professional
FileMaker Programmers
FileMaker Services
FileMaker Web Solutions

Company Our Team
Why Choose Excelisys?
Our Philosophy
About Us
How Do We Charge?
Alliances
Industry News
The Goods eX Files
eX BizTracker 3.0
eX BizTracker 2.0
eX BizTracker Pro
Tips N Tricks
Demos
Portfolio Our Portfolio
Client Testimonials
Our Clients
Contact Us Our Team
About Us
Employment
1–866–592–9235
Legal | © 2012 Excelisys eX Logo Excelisys.com