De-Duplicate Within A Found Set Of Records

15 May 2015: Demo and article have been updated to make the technique 100% portable.

This is a quick follow up to the Ralph Learmont technique I posted the other day, in response to a comment seeking a generic technique to de-duplicate from within a found set.

Clearly there are various ways to skin this particular cat, and I have a suspicion my initial attempt can be further improved upon, but using Ralph’s demo as a starting point here’s what I’ve come up with:  De-Duplicate-A-Found-Set.zip

5-11-2015 10-47-47 AM

Bear in mind that the goal here is for the script to be 100% portable, i.e., you should be able to copy and paste this script into your solution and run it without any modification at all.

In the spirit of Ralph’s demo, and to keep things as simple as possible, you specify the field by activating it (clicking or tabbing into it) before running the routine.

Here’s the core of the de-duplication script.

generic-dedupe-found-set-v7

To see it in action, you could, for example…

  • Find all “CA” state entries, activate the FirstName field, run the script
  • Find all “Middle Age” AgeGroup entries, activate the State field, run the script
  • Find all “Milwaukee” city entries, activate the AgeGroup field, run the script

Etc, etc, etc.

3 thoughts on “De-Duplicate Within A Found Set Of Records

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.