Flow that automates adding/removing group type to a user group after Request from Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2025 12:43 AM
Hi all,
i need some help. We have a catalog item for users to request if they want to add or remove group types like itil etc. The user puts the information in variables and after that i call them in the flow.
And how can i change the group type? If i select the table user group there is only a field Type. And in this field i cannot enter either the variable or the sysid of the variable.
Has someone a solution? Or an idea how i can automate it. It must be via Catalog Item the request.
Thanks
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2025 11:55 PM
No worries, If my response(solution) works for you then, please hit the Thumb Icon and mark as Correct !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2025 01:36 AM
i have this problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2025 11:55 PM
type field on sys_user_group is list type and refers to table "sys_user_group_type"
So you will have to set the sysId of the record
Note: I assume your variable what_type is referring to table "sys_user_group_type"
If yes then use f(x) script and set it
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2025 12:13 AM
Hi Ankur, i am doing this in the script. But it returns object GlideRecord
// Get the sys_ids of the type in the group
var currentTypes = fd_data._3__look_up_record.record.type.toString();
var typeToAdd = fd_data._2__get_catalog_variables.what_type.toString();
if (currentTypes == '') {
return typeToAdd; // If the list is empty, just add the new type
}
else {
// Combine the current list with the new type, separated by a comma
return currentTypes + ',' + typeToAdd;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2025 01:29 AM
Now for unexplained reason it updates/returns nothing in the group. Even not object GlideRecord. It still has his assigned group type and nothing more happens
