Jump to content

Isolate Duplicates Using Script


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

Recommended Posts

Hi All,

I've got a situation where i need to isolate all records with the same value in a particular field. I.e. locate all duplicates and act on each set of duplicates individually.

e.g.

Rec 1: 0421223223

Rec 2: 0421223223

Rec 3: 0412311311

Rec 4: 0412311311

Rec 5: 0412311311

Rec 6: 0422102123

Duplicate values are in Rec 1 & 2 and then 3 & 4 & 5. I need to be able to isolate records 1 & 2 first for example, act on those (i.e. delete 1) then isolate the next set of duplicates (3 & 4 & 5) and remove 2 of those so only one remains.

Anyone have any bright ideas?

Any input appreciated.

Cheers,

~Genx

Link to comment
Share on other sites

Something like this should work:

Sort Records [ No Dialog; by field ]

Set Variable [ $value ; field ]

Go to Record/Request/Page [ Exit after last; Next ]

Loop

If [ field = $value ]

Delete Record [ No Dialog ]

Exit Loop If [ get(recordnumber) = get(foundcount) ]

Else

Set Variable [ $value ; field ]

Go to Record/Request/Page [ Exit after last; Next ]

End If

End Loop

Edited by Guest
Link to comment
Share on other sites

This topic is 5601 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
 Share

×
×
  • Create New...

Important Information

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