FileMaker scripts: Identifying unique values in a list

MACWORLD AUSTRALIA features an article by FileMaker Developer Brad Taylor isolating a unique set of values in a list:

Given a long list of items, it’s often useful to distill it down to a unique set. This script imports a table, looks at the target field, and then displays two windows – one showing the first occurrence of each value in the target field, and the other showing subsequent occurrences of the value.


A person may present a simple Excel list of customer transactions (say,transactions.xlsx) and wishes to produce a list of customers. Using demo.fmp12, one would run the script (Scripts > Import…), select transactions.xlsx, drag target field down to customer name (as per the screenshot below) and then import. The result includes a window titled “First appearance of value” displaying a list of unique customer names.

Taylor details the entire script he wrote, including error checking,  and comments it well.  For those who want to improve their scripting skills, here’s a great example.  Step through this script and study the sequence of events and the conditional logic he uses to trap, and sometimes display, error numbers.  Oh yeah–the solution to isolating unique records is pretty nice, too.

More…FileMaker scripts: Identifying unique values in a list – Macworld Australia – Macworld Australia.

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help