Cata log group field

Kanhaiya_Verma
Tera Contributor

On catalog, I want to create a group field which only shows groups the user is part of.

2 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Kanhaiya_Verma 

 

You want to show the group of logged in user? or any user in varaible?

https://www.servicenow.com/community/virtual-agent-forum/logged-in-user-groups-need-to-be-show-on-my...

https://www.servicenow.com/community/developer-articles/display-a-list-of-groups-on-service-portal-i...

https://www.servicenow.com/community/itsm-forum/get-all-groups-user-is-a-member-of-based-off-of-a-ca...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@Kanhaiya_Verma 

create a reference variable or list collector and use this in reference qualifier so that it shows only those groups which logged in user is member of

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

AnkurBawiskar_0-1740752123075.png

 

Working solution here: Logged in user is member of 2 groups, so it showed 2 groups

logged in user group.gif

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

View solution in original post

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Kanhaiya_Verma 

 

You want to show the group of logged in user? or any user in varaible?

https://www.servicenow.com/community/virtual-agent-forum/logged-in-user-groups-need-to-be-show-on-my...

https://www.servicenow.com/community/developer-articles/display-a-list-of-groups-on-service-portal-i...

https://www.servicenow.com/community/itsm-forum/get-all-groups-user-is-a-member-of-based-off-of-a-ca...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Kanhaiya_Verma 

create a reference variable or list collector and use this in reference qualifier so that it shows only those groups which logged in user is member of

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

AnkurBawiskar_0-1740752123075.png

 

Working solution here: Logged in user is member of 2 groups, so it showed 2 groups

logged in user group.gif

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

@Kanhaiya_Verma 

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