Remove User from Assignment Group with Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 05:58 AM
Hi, I`m looking for an "Flow Designer" flow to remove ITIL User from her Assignment Groups.
I dont want to delete the Group, I only want an automatic flow, who can remove the selected Groups from the User Groups (selected in Catalog Item).
Have anyone an Idea?
I know, that I can use the table sys_user_grmembers
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2021 01:31 AM
Here is my script include for the refrence qulifier:
function refqualgroupmemebers(){
var group = current.variables.assignment_group; // your assignment_group variable name
var users = '';
if(group!=''){
var getMembers = new GlideRecord('sys_user_grmember');
getMembers.addQuery('group',group);
getMembers.query();
while(getMembers.next())
{
users = users + ','+ getMembers.user;
}
return 'sys_idIN' + users;
}
else{
return 'active=true';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2021 12:22 PM
Hello,
I'm actually trying to do the same thing. Would you please elaborate the flow process? I'm new to flow designer and not sure how to create the trigger action. Also, I understand that the question for the group you have created is by variable set, but how did you manage to filter the members by the group selected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2021 03:20 PM
Hi
variable on the multi row variable set is very simple, one line works for me.
assignment_group is a lookup select box based on the group field.
assignment_user is a reference with the qualifer of "javascript:u_getMembers(current.variables.assignment_group);"
Thats it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2021 03:36 PM
Hello,
Thanks for the reply.
Is this what you meant for user:
And this for group:
If so, I ran into this issue where it shows lots of duplicates for assignment group. Still shows all the users. So it looks like I'm making a mistake somewhere.
The other issue I ran into is with the flow steps. I tried to replicate your image, but wasn't sure on little details on each action.
Here is what I have:
I tried requested item record pill but whenever I try to save it, it loops for ever and never finishes
For each:
Delete Record:
Update Record:
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2021 03:52 PM
Hi
With regards to your flow for Get Catalog Variables, you need to select the trigger record as Submitted Request Item where you field is mandatory.
For the final step 7, I update the RITM by setting the below values