Script to get Groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 10:34 AM
Hi guys, I'm new to servicenow. I have a catalog to add/remove users from groups, but I would like to put an option when the user selects a group of type "Approvers" to appear in a read-only list all the approving groups that it is already included, I know how to do the query to get these groups but I'm lost on how to make an ajax script and a client script calling it to do this function, can anyone guide me?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 10:40 AM
Hi,
Please check below link to learn more about GlideAjax.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 11:06 AM
Are you trying to restrict what list of groups are shown to select? You do not need an Ajax call, but you can use a script include to hold the filtering logic. Let me know what you are trying to accomplish (variable values, group attributes, etc.) so we can narrow our solution accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 11:23 AM
Thanks for the answer, I would like to show a variable with all the groups of type "Approver" that the user has, because when he selects a new group of the same type, I want to ask him if he wants to leave one of those approval groups he has is already included

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 01:22 PM
Help me to understand the full scope of the ask. It sounds like there is a policy that limits the number of approval groups a person can belong to. Is this correct? Is there any reason why a user must select a group to be added to as well as to be removed from? This seems to overcomplicate the procedure a user would need to do in order to submit.