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.

Assignment group for logged in user

miro2
Mega Sage

Hi,

I want to display only those groups in the 'Assignment group' field where the logged-in user is a member. I tried using the following script in the HR Template on HR Service, but it didn't work. 
 javascript:'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());

 

Does anyone have suggestions on how to display groups specific to the logged-in user in the 'Case Creation' section?

miro2_0-1693252257310.png

miro2_1-1693252399311.png

 

12 REPLIES 12

what you mean by that sys_id needs to be assignment_group?

Sorry confusion at this end, please ignore 'sys_id needs to be assignment_group'

 

miro2
Mega Sage

Hi @Tony Chatfield1 
I found an article that says advanced reference qualifiers are not supported on the Case Creation page. Found a workaround for the Case Creation page. We can use sys_idINjavascript:gs.getUser().getMyGroups() directly in the reference qualifier.