Remove duplicate records from Group Member[sys_user_grmember] table.

HrishabhKumar
Kilo Sage

How can we remove duplicates from Group Member table. I know we can use Fix scripts to do that, but I want to know the optimal approach.

 

HrishabhKumar_0-1744268593453.png

 

 

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @HrishabhKumar 

Are you sure these are all the same users and haven't been added multiple times? Since the user names can be identical, try using the user ID or email to cross-check whether they are the same or different users.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

They are same @Dr Atul G- LNG 

Hi @HrishabhKumar 

In this case, open the group and go to the group member-related list. Move all the duplicate records to the left slush bucket, and the same process will apply. It's easy, quick, and will reflect the results immediately.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@HrishabhKumar 

as per image each row in Group member is unique.

Are you saying Admin HK and Admin SB are same users and should not be added to same group?

If yes then you should check why there are same users for 1 purpose?

Based on that you can take the next steps

Logically those are separate users and have separate sysIds and hence system allowed insertion

If my response helped please mark it correct and close the thread so that it benefits future readers.

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