- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2023 11:17 PM - edited ‎11-08-2023 11:18 PM
I created a form to show only specific groups using reference qualifiers to add/remove users from aad groups.
form and flow works fine, but when im using the form to select groups, is it possibly to only get the groups the user is not member of when adding and when removing only the groups the user is member of?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2023 11:51 PM
Hi @Jori
Let's try the below approach in the Reference Qualifier of your Group variables.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Work perfectly! Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 10:29 AM
Hello! this works great for the current logged in user, but is there a way to modify this script where it would show only the groups that the current user record being viewed is a member of?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2024 08:40 PM
Hi @jakeb25
Yes that's exactly the above query from my screenshot.
sys_idINjavascript:gs.getUser().getMyGroups();
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2024 05:45 AM
Thanks for the swift response! Unfortunately, that does not work for our use case because the getMyGroups function still only pulls in the groups of the currently logged in user, we're looking for the groups that the user record we are looking at is a member of, so we did get there but had to use this script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2024 08:37 PM
Hi @jakeb25
I see. So the case is that we wanna retrieve the groups associated with a specific user input.
Your getGroups function appears to be in good shape. Simply invoke it within the Reference Qual and it should do the trick.
javascript:new UserRefQual().getGroups(current.variables.<your_user_reference_variable_name>);
Cheers,
Tai Vu