ServiceNow Reports - remove duplicate records

Service Manager
Kilo Guru

Hi,

We are working on export of records from Incident metric(Incident_metric) database view.

Records are exporting to an excel sheet via Export set. My question is, how can we remove the duplicate entries from the excel sheet or how could we skip the export of duplicate records.

Thanks

7 REPLIES 7

Hi 

 

I found a similar question in one of the other threads. Do check if this is useful to you.

Basically they are creating a script include to filter out duplicated and calling that Script Include in the report Filter.

https://community.servicenow.com/community?id=community_question&sys_id=b5013181db1cfb441cd8a345ca96...

Please mark reply as Helpful/Correct, if applicable. Thanks!

Tanaji Patil
Tera Guru

Even though you resolve it I would like to let you (and other having similar query) know that duplicates could also be removed using a script include as a filter on the export set.

https://community.servicenow.com/community?id=community_question&sys_id=d3680beddb1cdbc01dcaf3231f96...

 

You script include call should return only the sys_ids of metric_instances which should be exported.

Note: incident_metric is a database view so records you see are not having sys_id. Instead you should use metric_instance table.

Check this post to see how you can remove duplicates via script-
https://community.servicenow.com/community?id=community_question&sys_id=fa709ee3dbec9fc87b337a9e0f96...

 

-Tanaji

Please mark response correct/helpful if applicable.