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. 🙂
David is a FileMaker Pro Developer with Excelisys: David has been a FileMaker Pro developer creating FileMaker Pro solutions for over 15 years. Considered a technical wiz, an exceptional and determined problem solver, and described by his peers as one of the best FileMaker Pro developers in the industry, David excels with “encouraging” FileMaker Pro to do things that most consider impossible! The best part of his talents, is that he loves to share and implement those cutting-edge new tools and tricks for the benefit of his clients and their projects, as well as with other members in the FileMaker Pro community.
Welcome to eX-Cetera, our little corner of the website where you will find the latest tips, tricks, and news relating to our company and our world of custom database software and web application development.