Set up the QuickFind module in FM Starter

Tips from practice and a hidden function


27. April 2023In FM Starter, ModulesBy Karsten Risseeuw6 Minutes

The QuickFind module in FM Starter is a simple generic search that works on any layout without further customization. The module works with the Quick Find in FileMaker. Here are some tips and tricks on how to work better with it.

Quick Find Module

The QuickFind module is used everywhere in FM Starter. There is also a dedicated module page found via the developer dashboard > modules > QuickFind module.

The module can be used everywhere

The module is generic. You can simply copy one of the two finished bars and paste it on any page. There is a variant with text buttons and a variant with icons.

Setup directly in the layout

The QuickFind module of FM Starter is based on the Quick Find function of FileMaker. This is generic. The module searches over all fields of a layout for which the Quick Find option has been enabled. When you click on a field, you can enable or disable the option under Inspector > Data > Include field for Quick Find.

When the search becomes slow

If the search becomes slow, it may be due to several reasons. Usually it is either a particularly large amount of data, or computationally intensive fields are included in the quick search. Both can lead to massive delays.

How can this be optimized?

Interface
The QuickFind module has a button to the left of the search field. If the switch is set to “green”, then a search is performed for each input. This is after each letter that is written. A search term of 7 letters is therefore searched for 7 times. If you switch the function to “red”, you can first write the word, then click on the search icon (magnifying glass) to trigger the search.

Quick Find Select Fields
By far the best option for optimization is careful selection of the fields that should be considered for quick search. This can be defined in the layout mode for each field. The simplest way is to first select all objects on a page and then deactivate them altogether. After that you can activate the important fields specifically for the quick search.

Avoid calculation fields and summary fields as much as possible. Likewise, you should hide the fields on portals if possible. Fields on portals require a lot of time. What remains are a few fields, all of which can be indexed. This leads to fast search results, even with large tables.

Define target layout for multiple results

There is one function that is not visible right away. This is a “secret” or hidden function. Namely, you can specify a target layout for the search results.

Seek and you shall find. Sometimes you can find more than 1 hit. How to display multiple hits? For example, if you start the search on an editing layout for a record, as is often the case, and you find two or two hundred results, you will not see more than 1 result on that layout. All other hits are selected in the result, but you have to scroll through them one by one. This is confusing and also not efficient.

There is another way.

There is an option to specify a target layout for the search results if more than 1 hit is found. This makes it possible to switch to a list layout when multiple results are found. This greatly facilitates navigation through data sets. A workflow might look like this:

Search on a detailed view > In case of multiple results switch to list layout > In the list you can click on one of the found records to get back to the detailed view.

In the animated example here above, it is shown that you start searching on a detail view, after which several results are found. This automatically switches to a list layout. In the list you can click on an entry to get back to the corresponding detail view. This is intuitively understandable for the user.

How do you set this up?

It is particularly simple. The name of the destination layout is passed as a Script parameter. This is set under the script triggers of the search field. You can activate this setting for each layout where it makes sense. And it succeeds like this:

  1. Switch in Layout mode
  2. Select the search field
  3. Right click on the search field and select “Set Script Triggers…”.
  4. 2 Script Triggers have been set up
    1. OnObjectKeystroke
    2. OnObjectModify
  5. For the second Script Trigger the script “QuickFind Script” was selected. Here you can now specify the name of the target layout as a parameter.

After this simple addition, you often get a better result in the user interface.

You can easily add this customization where you frequently switch between detail view and list view.