Real-Time QuickFind

by: David Thorp

R…
Re…
Rem…
Reme…
Remem…
Rememb…
Remembe…
Remember…

…what life was like before instant search on the web became the norm? We had to actually type out whole words and phrases, hit the pesky “return” key and THEN look at the results. Then maybe type in more words and phrases and search again if the results weren’t quite to our liking.

Just like us, our users have come to take instant-search for granted. Search results autocomplete as you type. That’s just how computers work now. Except, of course, in the hundreds of applications that don’t intrinsically support an instant search feature, including, sadly, native FileMaker Pro.

In the grand scheme of things, FileMaker Pro’s Find Mode is pretty amazing. This native functionality allows for extremely powerful granularity in the construction of both specific and more open-ended queries. Custom development can add to the simplicity and speed of producing a found set of records using Find Mode.

But despite all of this, the web has given most of us a different set of expectations when it comes to intelligent and efficient searching. The responsiveness of your favorite search engine – or any similar search fields found within a myriad of modern web, desktop and mobile apps – can make the task of performing a find in FileMaker Pro seem somewhat old school. Even FileMaker Pro’s built-in Quick Find feature, which returns the results of a query of multiple fields on a layout at once, stops short of providing the kind of instant gratification of seeing every possible result as you type. There are plenty of cases where the interface, the application, or the specific problem points to a “Search” box that users will use and want to see instant results.

But instant searches are about more than instant gratification. For the most active users of a solution, the time spent searching for records and sets of records adds up fast. Any amount of time saved is more than just a welcome feature. In many cases, the immediate feedback of instant search is expected.

So the challenge we tackle here is to provide results which are quicker – dare we say in “real time” – than successive Quick Finds, and provide users the experience of knowing the answer to their questions before they finish asking them. There are a few ways to do this, as we’ll see, and a few challenges with implementation that require a bit of extra attention. We want to find relevant records and return results instantly, as users type, with the fewest possible keystrokes and no unnecessary delays.

That “no unnecessary delays” is the fun bit…

FileMaker Pro’s native QuickFind feature is a script step (Perform QuickFind) that takes the contents of a given field and searches for its contents in whatever fields are set to allow it, on the current layout.  But how to get it to run…

Option 1. Put a button next to the field.  Click the button.  Performs the Find.  Ok.  But we can do better.

Option 2. Add an OnObjectExit script trigger to the field.  Type your criteria.  Tab out of the field.  Script is triggered and performs the find.  But what about those “instant results” we were talking about?

Option 3. Add an OnObjectModify script trigger to the field.  Now we’re getting our “instant results”.  Every keystroke that modifies the field triggers the script and performs the find.  But…

The problem here?  What if the find takes a while, for any reason: unindexed fields being searched, large numbers of records, deployment over WAN, etc.  That’s going to make. every. keystroke. pretty. tedious.

Check out the file to see our solution. 🙂

**This article is provided for free and as-is, use, enjoy, learn, and experiment at your own risk – but have fun! eXcelisys does not offer any free support or free assistance with any of the contents of this blog post. If you would like help or assistance, please consider retaining eXcelisys’ consulting & development services.

About eXcelisys, Inc.: Founded in 2001, eXcelisys (www.excelisys.com)is an FBA Platinum Partner and FileMaker Certified developer organization. eXcelisys specializes in designing, developing, customizing, supporting, consulting, migrating, upgrading, fixing, and integrating of database solutions for Desktop, Mobile, and Web. Our core technology competencies are FileMaker Pro, FileMaker Go, and MySQL for database frameworks, along with FileMaker WebDirect, WordPress, MySQL, PHP, CodeIgniter, PostgreSQL, Joomla, Drupal, Magento, CSS, HTML5, and Javascript for web sites and web applications. Aside from providing eXcellent customer service, our goals are to use these technologies to intuitively automate your organization’s data solution needs seamlessly and flawlessly across the web, mobile, and desktop platforms. Contact eXcelisys today for a free estimate and consultation about your business software automation needs @ 866-592-9235.

eXcelisys, Inc. is an independent entity and this web site/information/blog post has not been authorized, sponsored, or otherwise affiliated with FileMaker, Inc. FileMaker is a trademark of FileMaker, Inc., registered in the U.S. and other countries.