reference qualifier to show only wanted groups

Jori
Giga Guru

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?

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @Jori 

Let's try the below approach in the Reference Qualifier of your Group variables.

TaiVu_0-1699516195027.png

 

Cheers,
Tai Vu

 

 

View solution in original post

14 REPLIES 14

Jori
Giga Guru

was wondering if it needs some kind of script incude for sys_user_grmember checker that is additionally called from reference qualifier?

Tai Vu
Kilo Patron
Kilo Patron

Hi @Jori 

Let's try the below approach in the Reference Qualifier of your Group variables.

TaiVu_0-1699516195027.png

 

Cheers,
Tai Vu

 

 

would this work somewhat like this if i want to add this in the already existing query? 
nameSTARTSWITHexamplesomething^sys_idNOTINjavascript:gs.getUser().getMyGroups();

Hi @Jori 

Yes it should works as well. 😁

Btw, I can see your use case is that there's a Reference field User, and a List Collector as Groups.

Why don't we implement autofill for the Groups variable?

Something like:

1. Select User

2. Get all current Groups that the User is member of.

3. Fill into the List Collector.

Similar to the OOTB Edit button under related list.

TaiVu_0-1699517303503.png

TaiVu_1-1699517310553.png

 

Then, we don't need to care about the dynamic reference qualifier.

 

Cheers,

Tai Vu

interesting idea to implement autofill. but i wonder if this solution would add all the groups to the request that the user is already part of in addition to the new ones that are requested?

This other solution you suggested worked perfectly! thanks a lot for assistance! ill keep the other idea in mind if i need to furhter develop this, but i think im proceeding with this one:
nameSTARTSWITHx^emailSTARTSWITHy^sys_idNOT INjavascript:gs.getUser().getMyGroups();