Creating a report to show Incidents without Interactions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 03:15 PM
I am trying to generate a report for the dashboard that allows me to see Incidents without Interactions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 03:34 PM
Hi @SimonHind,
and can you please show us what you tried?
The interactions are stored in [interaction] table incidents in [incident] eventually [task] and if an incident is created from an Interaction, this relationship is stored in [interaction_related_record].
So you can query all the incidents that AREN'T in this table interaction_related_record, because if they are then it means they have an interaction associated. It could be possible to use GlideAggregate instead of GlideRecord as you want to get just number without any data manipulation to it.
And don't forget to add some period of time - all incidents created in last 30 days etc...
Share us here your progress
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 03:45 PM
@SimonHind the script below might be beautified but it works and could serve as an inspiration:
In my PDI I set encoded query on 5 incidents where only 1 has interaction, remaining 4 don't:
(your condition will be different - created in last 30D, 7D, has this or that category, assignment group etc.)
var incidentGR = new GlideRecord('incident');
incidentGR.addEncodedQuery('category=hardware^priority=1'); //5 incidents match this
incidentGR.query();
while (incidentGR.next()) {
var hasInteraction = false;
var irrGR = new GlideRecord('interaction_related_record');
irrGR.addQuery('document_id', incidentGR.sys_id); //just 1/5 has an interaction
irrGR.query();
if (irrGR.hasNext()) {
hasInteraction = true;
}
if (!hasInteraction) {
gs.print('Incident without interaction: ' + incidentGR.number); //remaining 4 Printed
}
}
Let me know what do you think and if this helped you and my efforts were not for nothing :))
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 04:29 PM - edited 07-18-2025 04:31 PM
This is my basic Report using the Interaction related Record
it shows ID of related record with Incident: INC#######
166 in total, however if I switched to Incident table
ideally what I am looking for is all Incidents where there are no Interactions, so i hope my Interaction related Record is correct for this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 11:37 PM
Hi @SimonHind ,
You just need to add a related list condition like below:
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/