Report to fetch all the Incidents opened by a Group

Bijay Kumar Sha
Giga Guru

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.

4 REPLIES 4

OlaN
Giga Sage
Giga Sage

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.

SatyakiBose
Mega Sage

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.

BharathChintala
Mega Sage

@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();

BharathChintala_0-1678345736852.png

 

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala

AndersBGS
Tera Patron
Tera Patron

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/