User manual

Table Of Contents
10-14
FileMaker Pro User’s Guide
The Seminar file contains records of clients who register for a
seminar. Each client has a unique identification code, the Client ID
field, which is a concatenation of the clients’ last name and phone
number. Some records contain the same identification number—
these are the duplicate records you want to find.
Tip If your database doesn’t have a unique identification field, define
a calculation field to create one from existing fields. For example,
combine first name, last name, and birthday to create a unique
identification for each client.
2. Add two fields.
Define these fields in the Seminar file:
1 A text field, called Mark. When the script finds a duplicate record,
it places an x in this field to mark the record.
1 A global field, called Global, to store the unique identification
while comparing records. Global should be the same data type as the
Client ID field.
3. Display the Mark field.
Create a layout that displays the Mark field, or add the field to an
existing layout. You’ll use this layout to store Find settings in the
following step.
4. Store settings.
Store Sort and Find settings for the script.
5. Define the script.
In ScriptMaker, define the Find Duplicates script.
When you perform the Find Duplicates script:
1. It finds all records, and then sorts them by the ClientID field so
that records with the same ClientID are grouped together.
2. Starting with the first record, the script copies the value from the
ClientID field into the Global field.
3. The script goes to the next record and compares the value in
ClientID with the value in Global.
1 If the values match, the record is a duplicate and the script puts an
x in the Mark field.
To store this setting Do this
Sort In Browse mode, choose Sort from the Mode menu.
If fields appear in the Sort Order list, click Clear All.
Click ClientID, choose Ascending order, click Move,
and then click Done.
Find Choose a layout that displays the Mark field. In Find
mode, type x into the Mark field, and then switch to
Browse mode. (You don’t have to perform the find
request.)
aaa
Client ID
Record 5
Client ID
Mark
aaa
Global
aaa
Client ID
Record 4
Client ID
Mark
aaa
Global
aaa
Client ID
Record 3
Client ID
Mark
aaa
Global
aaa
Client ID
Record 2
Client ID
Mark
aaa
Global
aaa
Client ID
Record 1
Client ID
Mark
aaa
Global