- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 04:50 AM
Hi Experts,
I have to remove duplicates in Incident_metric table report.
Currently I am trying to remove using script include but I couldn't achieve it. Can anybody help me doing this.
Report:
Script Include:
Can anyone help me to fix it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2019 03:13 AM
Hi Poojitha,
The above code will not work as it returns incident number which is same for duplicate records so the report will display duplicate records. As per your screenshot, if the function returns 'FVSD_2337' then report will still display all three records as they all satisfy the condition.
So you need to return unique value like sys_id of one of the duplicate so the report doesn't display the other duplicate.
Let me know if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 08:52 AM
Hi Poojitha,
Could you tell us the actual code resolved the issue?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2020 02:54 AM
Hi,
We couldn't able to remove duplicates but my customer is convinced for duplicates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 04:16 AM
Does it related to database views duplicates?
Currently i am facing same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2025 07:37 AM
Hi Nagaraju,
To remove duplicates, use the count distinct option under the aggregation field, then select the Sys ID of the incident. See screenshot.
I must also say, rather than using a script to run this type of report, maybe using the database view would be a better option. The incident_metric would usually cater for this kind of scenario.
See attached screenshot
