ServiceNow Reports - remove duplicate records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2020 10:03 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2020 11:39 AM
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.
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 11:15 AM
this url
helped me to resolved the issue

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2020 11:29 AM
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.