Find Duplicates




This AppleWorks script finds records that have a duplicate value in the field that you specify. You can choose to show all duplicate records or just the repeats (ie all except the first occurence in each set of duplicates).

Enhancement Pack


This is one of over 40 features in the Enhancement Pack for AppleWorks.


The “Find Duplicates...” item appears in the Database sub-menu of AppleWorks Scripts menu.

Select a field in your database (any record) and select the “Find Duplicates...” menu item. When asked, choose whether to find all duplicates or just the repeated (ie all except the first of each) occurrences.

You can delete all redundant records by doing this:

    1. Click in the field you want to check.
    2. Select the Database: Find Duplicates... menu item.
    3. When asked whether you want to show all duplicates or just the repeats, click "Repeats Only".
    4. After a minute or so, all of the records with repeated values appear. In the Edit menu, select “Select All” then “Delete Record”.

Be sure that you don’t need the data before deleting.

Operates on the front document, which must be a database document. You must have a field selected (ie cursor flashing or text selected in a field).

This script works with AppleWorks 6, not version 5 or earlier.

Only registered users are permitted to use the supplied files after 14 days or edit them.

This script is included in the Enhancement Pack for AppleWorks.

In case you are curious, here are some snippets from the (run-only) script:

tell application "AppleWorks 6"
     tell database of front document
          set keyList to field fieldName in every record
          hide every record
          set end of duplicates to recordN --
first occurence
          if showAll then show record recordN
          repeat with matchN from recordN + 1 to length of keyList
               if item matchN in keyList is keyValue then
                    set end of repeats to matchN --
repeat occurence
                    show record matchN
               end if
          end repeat
     end tell
end tell

Please email us any queries about this page.