Smart Phone Caller ID Triggers Customer Search in FileMaker Pro Database

A while back, I did a blog entry on capturing Caller ID to look up FileMaker database contacts using a VOIP system. I thought it might be interesting to see if the same thing could be achieved with a smart phone, such as an iPhone or Android device.

It turns out that JNSoftware LLC, has already created a Mac app that routes incoming Caller ID to various applications. They even have a FileMaker Pro 7 demo file assembled to demonstrate this in action. I created a new .fmp12 demo file and rebuilt the AppleScript to employ the new FMP URL method (FM 13.0v2 and newer). This revised AppleScript makes it fairly simple to adapt to any FileMaker contacts database.

Dialectic Working with FileMaker Pro


This guy apparently has the same phone number as me.

Where might this be useful?

While FileMaker Pro databases are in use in many businesses with sophisticated phone systems, there are an increasing number of people who work from home, or in a small office, where such a phone system would be overkill. Many people are cancelling landlines and smart phones are becoming the only phone they use. Having the ‘big office’ feature of caller ID lookup of FileMaker records from a smart phone seems like an appealing prospect. This is obviously more beneficial for users getting calls from customers already in their database. If most callers are new, then it is not as useful.

How fast is it?

Once this is setup, and a call comes in, the Caller ID is pretty quick to pop up. The app has its own dialog that shows name and number immediately, and then within about 1-2 seconds the FileMaker search happens, assuming the database is open. The AppleScript used here doesn’t embed a user name and password in the FMP URL string, but conceivably you could add this if your computer is secured.

Does it disrupt your work in your FileMaker Pro database? 

The search script opens a new window offset.  Right now, it is just going to the main Contacts screen in the FileMaker Contacts template, but conceivably it could go to a different view, perhaps a customer summary layout so it is more clear that something new is happening on screen.


  • FileMaker Pro database
  • Recent Macintosh (requires AppleScript)
  • Bluetooth Smartphone
  • Dialectic Software

Level: Intermediate

Development Time: 1/2 hour – 1 hour

Download Demo File

Dialectic — The Scriptable Dialer for Mac

To get started, download and install Dialectic, a Mac app for phone dialing and Caller ID capture. There is a free 14-day trial version and if you opt to purchase, Dialectic sells for $25 US.

Dialectic also has the capability of dialing out from the database, via AppleScript, but that won’t be the focus of my discussions here.


I also found another similarly priced app called Phone Amego that appears to have many of the same capabilities as Dialectic, but the interface was more confusing for me. It may be very good, but I was able to get going faster with Dialectic. It seemed like it might be able to generate an fmp url without the need for AppleScript, which is good, because it didn’t seem to have the ability to use AppleScript with Caller ID.

Once installed, Dialectic appears as a menu bar icon at the top right of your Mac Desktop

The first time you open the app, you will probably see the Configuration Utilities window, if you missed it, it is in the drop down menu.

Pair your Bluetooth Phone with your Mac

BT Phone Configuration Utility

Download a Configuration Utility for your particular phone. There are a long list of VOIP and business phones. In this case, we are going to use the one for Bluetooth phones.

I am not sure what the difference between the two BT Phone options is but the first one (HFP) seemed to work with my iPhone 5S. Presumably these will work with any Android phone as well, so long as you are able to pair it with your Mac.

In FileMaker – add a Phone Numbers calc field

Many Contacts databases will use multiple fields for different telephone numbers. Phone numbers may also be formatted in a variety of ways. To get around this issue, a calculated field lists the various phone number fields stripped of all formatting using FileMaker’s Filter function. This field will be used in the search script in the next step.

Create a FileMaker Caller ID Lookup Script

The AppleScript that Dialectic is calling will feed the Caller Name and Phone Number into a script variable. The FileMaker script catches the inbound phone number, strip it of any formatting and does a search with it, using the calculated field mentioned above. If no records are found, an error message is displayed.

Obviously your search script may vary depending on how your database is structured, but you can probably figure this part out. The important thing is that you want to have the inbound number search on a raw unformatted number field in your database.


  • At this point, the script could open a web browser window and attempt to look up the number using Google or some reverse phone number look up web site.
  • Log the call

Modify the AppleScript {database, script, FM version}

I wasn’t thrilled with the sample AppleScript provided by Dialectic:

  • Most of the logic was in AppleScript and I prefer to control things from FileMaker.
  • It appeared to be fragile, causing a loop that kept wanting my FileMaker 14 version to convert the old .fp7 file to the new format. I had to restart to get out of the loop.
  • Finally, the Dialectic demo file had to have the AppleScript in the same folder as the database.

I created a new script that employs the fmp url method to call FileMaker. All I need from Dialectic is the inbound phone number and caller ID name. Dialectic has AppleScript functions to deliver these two parameters.

The items to change in the AppleScript, when adding this to your own solution are:

  1. the name of your FileMaker Pro database,
  2. your FileMaker script name and
  3. possibly the version of FileMaker you are running this on.
--This script is for Dialectic, a Mac app designed to call 
--and answer your telephone. 
--it works with VOIP, business and bluetooth phones.
--this script uses FileMaker fmp url method to call a 
--FileMaker script. 
--Edit the properties below to match your FileMaker script
property myDatabaseName : "Contacts.fmp12"
property myDatabaseScript : "Caller ID Lookup Contact"
property timeout_duration : 30
property show_dialogs : true

on handle_incoming_call_action(contact_name, contact_number)
 --the handle_incoming_call_action with the parameters 
 --contact_name and contact_number
 --are properties of Dialectic?

 -- modify the application name to 'FileMaker Pro' if necessary.

tell application "FileMaker Pro Advanced"


--FileMaker 13.0v2 and above supports this type of URL 
--to run a script inside 
-- FileMaker, passing a parameter.
--set up your script to accept as a parameter the path of a File.

getURL "fmp://$/" & myDatabaseName & "?script=" & myDatabaseScript 
     & "&param=" & contact_number & " " & contact_name

end tell

end try

end handle_incoming_call_action

Configure Dialectic – Notifications


  • Dialectic is installed and running
  • FileMaker has a useable script to call
  • The AppleScript is modified to call the correct FileMaker version, database and script.
  • The last step is to have Dialectic call the AppleScript.

In Dialectic’s Preferences, under the Notifications panel, set up the AppleScript that the Caller ID will trigger.

  1. Turn on ‘Enable Call Detection’ option.
  2. Click the ‘Launch Application or AppleScript’ option and you will be prompted to select the AppleScript. Locate the AppleScript in the dialog box and select it. Click OK.

That’s it, test and debug. Remember to add your testing number to the sample data, so that you can have a successful lookup. Hopefully everything will run smoothly and you will be able to start doing Caller ID FileMaker Pro lookups right from your Android or iPhone.


I did not see many software options in the Windows world. There seem to be some interesting packages, but none of them listed Bluetooth phone support. The two requirements are Bluetooth support and the ability to send out calculated url scheme calls.  If you know of any good alternatives that might work, please post them in the comments below.

Update 2016-01-29

If you just need a simple method of dialing out from FileMaker on the Mac, there is a built-in approach that requires a bit of configuration, but no additional software. The blog post and demo file are from FileMaker Examples. They are using the Open URL script step and calling ‘phone://’ concatenated with a phone number.

dialier script

4 Responses to “Smart Phone Caller ID Triggers Customer Search in FileMaker Pro Database”

  1. Would you know of an all-iOS version that could work with FMGo?

    • Not currently. I agree this would be great, but I think Apple locks down what can be done with the phone. Outbound calls are fine but inbound they limit the API.

  2. Douglas – This is the solution I’ve been looking for!!!

    So – I love the website, I’ve just book marked a few articles for some solutions I’m working on!

    With consideration to using the caller ID function to find a customer within a database, for an office with 3 lines and a static local phone number, would you suggest exploring the bluetooth option or moving to the VOIP option?

    We’re still using FM12 and our database has over 18,000 records in it….

    • Hi Tom,

      Glad you are finding the blog posts useful.

      I can’t totally say which route would be better, VOIP or iPhone, but it might be worth looking at VOIP systems. They are fairly inexpensive and can save you money on long distance calling as well. I believe some VOIP systems can also integrate iPhones into the mix.

      Good luck with it.


%d bloggers like this: