- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 12:30 AM
Hi All,
Could I please have your help for the below requirement.
We have a form from which we can add new groups to the existing users who are already part of groups. Upon user selection, slush busket will be made visible where the "Selected" section will display the groups where User is already part of.
We are now trying to make those values populated under the "Selected" section Ready Only but could not find any way to achieve the same. Please advise if we can achieve this. If this cannot be achieved, can we have other slushbucket in the same form so in this one will display the values existing groups user is part of and shlould not be editable and in the another "Selected" section - user can add the groups they have to be added.
Thanks in Advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 07:38 AM
To exclude groups from the Available list that the user is a member of will require replacing the reference qualifier conditions with one that calls a Script Include, like this format:
passing in a variable value for the user. The Script Include would do a GlideRecord on the list reference table to replicate the conditions you have now, pushing the results (group sys_ids) to an array, then another GlideRecord on the sys_user_grmember table to make an array of group sys_ids that the user is a member of. Finally, use ArrayUtil to remove groups (sys_ids) from the first array that are present in the second array and return the results like
return 'sys_idIN' + finalArray.join(',');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 07:38 AM
To exclude groups from the Available list that the user is a member of will require replacing the reference qualifier conditions with one that calls a Script Include, like this format:
passing in a variable value for the user. The Script Include would do a GlideRecord on the list reference table to replicate the conditions you have now, pushing the results (group sys_ids) to an array, then another GlideRecord on the sys_user_grmember table to make an array of group sys_ids that the user is a member of. Finally, use ArrayUtil to remove groups (sys_ids) from the first array that are present in the second array and return the results like
return 'sys_idIN' + finalArray.join(',');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2024 05:59 AM
Hi Brad,
Thank You for the responce.
We already have the script include that gets the list of groups and the existing groups of user whcih is called in the client script to display the groups based on the selection of request(to add groups or to remove).
Can you please help with the piece of code for reference.
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2024 07:01 AM
I will try. I'm not following what it is exactly that you don't yet have in place. Maybe it would help to show what you do have working, then what is missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2024 11:46 PM
Hi Brad,
Thank You for your help! That worked!