Creative Wisdom ยท FileMaker Pro tipsArchive

Do not show duplicates

Chong Ho (Alex) Yu, Ph.D., MCSE, CNE (2001)

Problem

In a database I have multiple entries using the same identifiers. For example, in the following scoring database "Alex Yu" took four exams while "Jody Wong" took three.

Name of Examinee

Exam Module

Score

Alex Yu160
Alex Yu255
Alex Yu367
Alex Yu476
Jody Wong189
Jody Wong290
Jody Wong3100

However, I want to get a quick view of the examinees by suppressing duplicates in the search_results.htm, as shown in the following:

Name of Examinee

Exam Module

Score

Alex Yu160
Jody Wong189

Solution

1. Create a global field named constant and assign a value of "1" to this field.

2. Create a self-relationship by linking the examinee name back to the examinee name:

3. Create a lookup field called CheckDup. Set the logical branching condition as: If the new examinee name matches an existing name in the same database, copy the constant value (1) into the CheckDup field, otherwise, put a value of "2."

4. In the search.htm page, the manifest search field is Name. Insert CheckDup as a hidden search field and pre-assign the value to "2." Then only the first instance of each examinee will be returned.

<INPUT TYPE=hidden NAME=CheckDup VALUE=2>