- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 08:33 AM
Create a catalog item withe following details:
Item name : Add User to a Group
Variables:
1. Please select the user. ( it should show list of all the active users so that we can select one )
2. Select the Group. ( it should be showing all the active groups where the user is not already member of it )
Please give me solution for this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 08:47 AM
do this
1) 1st variable add this reference qualifier -> active=true
2) add this in 2nd variable ref qualifier
javascript:'sys_idNOT IN' + new global.ArrayUtil().convertArray(gs.getUser().getUserByID(current.variables.firstVariable).getMyGroups());
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 10:51 PM
it should work fine.
Please use the advanced ref qualifier and share the screenshots of output
which user you selected? which groups it's showing now?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2025 10:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2025 01:26 AM
it did work fine for me when I tested
I am part of 1 group so it didn't show me that group when I selected the group variable
See below
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2025 01:40 AM
Thanks for the help now it's working