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