Do not show duplicates

Chong-ho (Alex) Yu, Ph.D., MCSE, CNE

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 Yu

1

60

Alex Yu

2

55

Alex Yu

3

67

Alex Yu

4

76

Jody Wong

1

89

Jody Wong

2

90

Jody Wong

3

100

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 Yu

1

60

Jody Wong

1

89

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>

Navigation

FMP Tips Contents

Other computer tips

Search Engine

Credit/Copyright ©

Simplified Navigation

Table of Contents

Contact Me