Report to fetch all the Incidents opened by a Group

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2023 10:49 PM
I would like to create a report on Incident table where the filter condition will be - 'Opened by' is 'ABC Group Name'. which means Opened by will be a group name not a individual user.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2023 11:02 PM
Hi,
Have you created some custom field to store which group created which record?
Otherwise, there is no such field OOB to store that information.
You can report on which user created which record, but a user can be member of many groups, so that might not be so helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2023 11:03 PM - edited ‎03-08-2023 11:05 PM
Hello @Bijay Kumar Sha
The system does not store which group opened the incident.
It is always an individual user.
You can create a custom field, but again the question is, how and what group name you want to store.
The reason being, one user can be a member of multiple groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2023 11:09 PM
@Bijay Kumar Sha Possible with Script inculde
write a function in script include
getUsers; function(){
var us = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group','abcsysid');
gr.query();
while(gr.next()){
us.push(gr.user.toString());
}
return us.toString();
},
Hoping opened by is refence field
in condition
opened_by.sys_id is one of javascript:scriptincludename.getUsers();
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2023 01:19 AM
Hi @Bijay Kumar Sha ,
How will you accommodate that a person can be part of several groups, or is this not an issue in your instance?
If it's not an issue, you can query the table "sys_user_grmember" to obtain the group from the user.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
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/