Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create a report of 'Requested Item [sc_req_item] created from members of particular group

hakimbelkou
Tera Contributor

Hello,

 

I need help created a list report of sc_req_item records that are created from users that are members of particular groups.

I tried to use related conditions but I'm having trouble.

 

Thank you!

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@hakimbelkou 

the only way is to use scripted report filter condition, see this

Creating dynamic JavaScript filters in reports 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@hakimbelkou 

try to create dynamic filter option and then use that here

Opened by [IS DYNAMIC] Your Filter

Create a dynamic filter option 

AnkurBawiskar_0-1763388063744.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

MaxMixali
Tera Guru
You can build this report easily using a dot-walk filter.
 
Steps:
1.Go to
Reports -> Create New
2.Choose Table = sc_req_item
3.Click Filter
4.Add this condition:
 
** requested_for -> Group membership -> is ->
Requested for > Group membership > Name  is  Service Desk
or 
Requested for > Group membership > Name  is one of  GroupA, GroupB, GroupC
 
 
 
 
or you can try to do via script 
 
 
var gr = new GlideRecord('sc_req_item');
gr.addJoinQuery('sys_user_grmember', 'requested_for', 'user');
gr.addQuery('sys_user_grmember.group', 'GROUP_SYS_ID_HERE');
gr.query();
return gr;