Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8351 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I need a filemaker script that will allow me to seacrh a field for all duplicate numbers and then delete all the duplicates but leave one of the records.

Thank you

Posted

THIS IS THE WRONG FORUM FOR YOUR QUESTION: However,:::::

The trick here is to use a relationship to find the duplicates, so for example you have a field „Surname“ the (Self) relationship is Surname::Surname

Now create a field, “SNDCount” which is a calculation (number):

Case (Count (Surname::Surname) > 1, Count (Surname::Surname, 0)

Ok, if you place this field on your layout (just as a test) you will see how many duplicates each record has.

Now you need a script:

Set error capture (on)

Find all

Loop

Find (restore) (You need to set this up to find numbers in SNDCount larger than 0)

Exit loop if CurrentFoundCount =0

Goto record request (first)

Goto related record (only find related) Surname

Omit

Delet all records

End Loop

This topic is 8351 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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