very Urjent !! Eliminate duplicate records in the report.

Bhavana Reddy
Mega Guru

Hello Guys,

I am stuck in a problem where i need to report on a table ( consider 2 reference fields below)

1) Contract 

2)configuration item

we have so many records with duplicate values and i need to remove this duplicate values and show only one record in the report

find_real_file.png

Note : The main problem here one contract might also be linked to multiple configuration item ( see below screen shot configuration item is different )

find_real_file.png

SO when i create the report i need to group by both "Configuration item and Contract " so that all the duplicate entries will be filtered 

 

Note : The above table i am reporting on is  huge ( more than 2 lakh records and i need to consider performance also)

 

Please suggest me guys how i can eliminate duplicates

 

@Ankur Bawiskar @Aman Kumar @Mohith Devatte @shloke04 

11 REPLIES 11

I would suggest finding the root cause of the issue first. Why are there duplicate records in the first place and what is causing it. If you cannot figure that out, you could create a fix script to get all the duplicate records and then delete them. While doing a GlideRecord on the table make sure to put setWorkflow(false) on the GlideRecord object to ignore any scripts that might be running in the background which might slow down the fix script deletion process. 

Community Alums
Not applicable

Hi @Bhavana Reddy 

 

I am not sure if you found the solution yet, but to get the unique value, I would suggest you to use Aggregation - Count Distinct (In the Configure tab), instead of count. This will provide you only the count of unique records in the graph. 

 

Regards,

Gagan k