how to Find duplicate user email in Users table List?

Allu Gopal
Kilo Expert

Hi,

I want to see the duplicate email users in the list view of User Table without using of show matching. Help me in this.find_real_file.png

 

2 ACCEPTED SOLUTIONS

Hi,

please use [IS ONE OF] operator

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hi,

it worked well

For multiple emails use [IS ONE OF] operator

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

23 REPLIES 23

Hi Kajal,

It is asking HI credentials for downloading the script include.

Ankur Bawiskar
Tera Patron
Tera Patron

@Allu Gopal 

check this blog

Search for Duplicates & Delete Based on 2 Columns

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can try background script for this and print those users


var duplicate = new GlideAggregate('sys_user'); 
     duplicate.addQuery('active','true'); 
     duplicate.addAggregate('COUNT', 'email'); 
     duplicate.groupBy('email'); 
     duplicate.addHaving('COUNT', '>', 1); 
     duplicate.query(); 
     while (duplicate.next()) { 
            gs.info(duplicate.email); 
     } 

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

It is working on back ground script but it is showing the results in list view while calling the function in script include. please refer the above images.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

this blog should help you showing in list with the script include approach

Find duplicate user email (or anything else)

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader