Skip 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.

How to delete duplicate records?

Featured Replies

  • Newbies

I have a data base that I imported, that has many of the same record.

All the records are IP address,(65.112.149.100) I want to delete the duplicates.

How do I do it?

Thank you for any help that you can give.

"I have a data base that I imported, that has many of the same record.

All the records are IP address,(65.112.149.100) I want to delete the duplicates.

How do I do it?"

Enter find mode, type the value in the appropriate field (IP address?, then Perform Find. You now have a found set of all the duplicates.

Under records menu, Omit Record (removes one of the records from your found set). Then Delete all. This sequence deletes all but one duplicate.

If you have multiple sets of duplicates, automate the above process in a script. Do this by Looping through all the records, finding all records with a particular value, omitting one of the records, then deleting the rest. If a record has no duplicates, you will not delete the record because it will be omitted.

If you need help with the script syntax, give a yell.

Tom Parker

[email protected]

http://www.tgparker.com/filemaker

  • 2 weeks later...

Hi there,

Here is a script which solve your problems, if I have understand your question right:

Make a global field "Search 2".

Make a calculation text field called "Search". Put your main fields in this field.

Make a script:

Show all records

Sort (Search-field A-Z)

Go to first record

Loop

Set "Search" to "Search 2"

Go to Next record. Exit after all.

If(Search = Search 2)

Delete or Omit if you want keep the records

Else

Set "Search" to "Search 2"

End If

End Loop

Good luck!

-Per

Here is a script I use to delete duplicates. It works with one duplicate or several duplicates of one record. REMEMBER..make a backup copy prior to running this script. (I have used the field that has duplicates as "ipAddress" shocked.gif" border="0

Enter Find Mode []

[]

Perform Find [ Request 1: ipAddress ! ]

[ Restore find requests ]

Sort [ Sort Order: ipAddress (Ascending) ]

[ Restore sort order, No dialog ]

Go to Record/Request/Page

[ First ]

Set Field [ g_DupRecords, ipAddress ]

Omit Record

Loop

If [ ipAddress = g_DupRecords ]

Delete Record/Request

[ No dialog ]

Else

Set Field [ g_DupRecords, ipAddress ]

Omit Record

End If

Exit Loop If [ Status( CurrentFoundCount) = 0 ]

End Loop

  • 2 weeks later...
  • Newbies

I am using FM 5.0 V3 and can not seem to duplicate this script? First off the Perform Find does not allow me to enter anything after it? Where you say to add [ Request 1: ipAddress ! ] after Perform find? Where am I going wrong?

The [ Request 1: ipAddress ! ] after the Perform Find commands represents a Find that was previously memorized. You could do this Find manually (outside of your script) first, then open your script in Scriptmaker. When you close the script, you'll get a box asking if you want to keep or replace find requests. Click "replace" and the script will remember your find request.

But a better way would be to build your find request into the script. In your example, right after the "Enter Find Mode" step, put a step that says:

Set Field [ipAdress, "!"]

Then the Perform Find step will run that as a request.

Steve Brown

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.