‘Type Ahead’ Style Searching through Portals in FileMaker Pro

FileMaker’s new Script Triggers allow you to achieve a Google-like type ahead search in FileMaker, searching through a Portal. Here is how to set something like this up based on a person’s first and last name.

The more letters you type…


The more the portal gets filtered…


Define a Search Field


Later we will tie a script trigger to this field.

Make it a Global Field


Create a Calculated Version of that Search Field


If(IsEmpty(Search by Persons Name); “0¶zzz”; Search by Persons Name & “¶” & Search by Persons Name & “zzz”)

Set the Calculated Result to ‘Text’


In the Portal Record create a calculated Search Field


Basically you want the last name on one line and then the full name on the second line. It could also look like this:

It could also look like this:

Last Name & ¶ &
First Name & ” ” & Last Name

This is so the search can look for both first name and last name.

Use the Calculated Version of the Search Fields on both sides in the Relationship


Use a Greater than and a Less than link to capture all people within that range. Tie it to a calculated field in the portal table that contains ‘First Name’ and ‘Last Name’ concatenated.

Create a Trigger Script


Trigger Script contents


On leaving the field, commit the record to update the portal

Tie the Script to a Trigger on the field, ‘OnObjectModify’


Now every time you type a letter, the search is fired off, narrowing the scope. This function can also work on a regular layout, without the portal filter. Instead of using the global field to filter, you just use it to feed a search.

5 Responses to “‘Type Ahead’ Style Searching through Portals in FileMaker Pro”

  1. Is there a video of this tutorial? As detailed as these instructions are I am new to FMP and am probably missing some minor detail for this to work.

  2. Works on fields like names okay, but how do we handle multi-paragraph text fields…like a table of “how To” processes notes. My use of type-ahead will only find the first word in each paragraph, but no other. I need to be able to portal search for any occurrence of any phrase I search for. Any suggestions?


  1. How do I update information in a whole bunch of records at once in FileMaker? | HomeBase Software - July 13, 2012

    […] Articles: Highlighting Rows in FileMaker lists or portals ‘Type Ahead’ Style Searching through Portals in FileMaker Pro Shortening URLs […]

%d bloggers like this: