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.

New report where "Created by" user is part of a specific group

khalito
Tera Contributor

Dear community,

 

I hope you can help me with this little problem of mine.

 

I am trying to create a report that gives me the list of all service catalog tasks (SCTASK) where the users who initiated the request are part of a specific group. So, in the example below, instead of saying "Request.Created by is one of A123456, A987654" I would like to say "Request.Created by.Groups is one of ABC, DEF"

 

I thought I could do this with "Related List Conditions" but I did not find anything there. And when I dot-walk to the "Created by" or "Requested for" fields, I am not to select anything that would bring up the user's group membership...

 

khalito_0-1730129130702.png

 

 

6 REPLIES 6

Ravi Peddineni
Kilo Sage

@khalito 

 

There are quite a few ways to achieve this. Best one would be creating a Client Callable script include that returns the list of user sys_ids from a specific group. Next, Call the script include and method using below in the conditions:

 

"Request. Opened By"  "IS ONE OF"  "javascript: new ScriptInclueName().methodName();"

 

 

 

Lemme know if you want the script include code too. 

Dear Ravindranath,

 

Thank you very much for the quick reply. the script include does make sense. I will give it a try and get back to you if I get stuck. 

 

But out of curiosity, do you think there would be a way to achieve the same result without resorting to a script?

@khalito 

 

You should build a dynamic filters for it to work without script. But dynamic filters will be shown on a platform level. Consult your platform architect before doing so. 

Runjay Patel
Giga Sage

Hi @khalito ,

 

you can add condition like below.

created by me and 

assignment group is dynamic one of my group.