Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Finding duplicate records

Featured Replies

I have been given a database of several thousand records. The records consist of only one field which holds a UK town name.

There are a considerable number of names, probably also serveral thousand, which are shown by a brief check of the database. These duplicates have been produced by error or because there are towns with the same name anyway.

I need to identify and delete any duplicates which exist.

Have tried Find with ! in the search field but this identifies all duplicates including, as it were the 'original' entry.

What I need to do is to leave one record of any particular name but identify and delete any other records which have the same name.

I have looked at self-joining which seemed to offer a possible solution but to no avail.

Can anyone give me any clues?

Sort your records by name and create script like this:

Sort

Go To Record First

Set Field[Any_Global_Field,Name}

Loop

Go To Record Request Next(exit after last)

IF Name=Any_Global_Field,Name

Delete Record

Go To Previosus record

Endif

Endloop

Other way is to export your records to other file using "summary by name" option, then delete all records then import from exported file.

Almost.

Sort

Go To Record/Request/Page [First]

Set Field[Any_Global_Field, ""]

Loop

If [Name <> Any_Global_Field]

Set Field [Any_Global_Field, Name]

Go To Record/Request/Page [Next, Exit after last]

Else

Delete Record/Request [No dialog]

End If

End Loop

You could do a ! search initially, to limit the found set and speed the process.

  • Author

Thanks for this suggestion which didn't quite work. However a later post changed the scripting which does the job.

  • Author

Thanks a million, the script does the job. Scripting in FMPro is not one of my strong points as I don't need it very often, so I doubt I would have got the solution otherwise.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.