Logged in user groups need to be show on my catalog item.

dhineshkumar
Tera Guru

Hi Experts 

I have catalog item "Access device tool" where I have the variable "requested for" (Read Only) it shows the current logged in user.  Based on the current logged in user I want to shows the respective groups on the groups variables on the same catalog item.

Example : Logged in user is able tutor. He is part of 4 groups. That 4 groups only need to shows on the groups variable.

Note : Note required on change client script request because when I open the catalog item its show automatically groups respective logged in user.

Thanks in advance

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@dhineshkumar 

so you can apply this advanced ref qualifier and it will work whenever Requested for is changed

Also since that Requested for is readonly will user be changing the variable value?

Add this in advanced reference qualifier on Group reference variable and it will show those groups to which logged in user belongs

javascript:'sys_idIN' + new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@dhineshkumar 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@dhineshkumar 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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