- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 12:33 PM
Haven't really had a reason for this before, but can you create a dynamic group in ServiceNow based off of characteristics on a User record?
We have a custom field on the User records called "Is Manager". I'd like to have a group in ServiceNow that contains all of those people and adds or removes people dynamically from it.
If there isn't functionality OOB, would you just build a Business Rule that adds and removes people from the group based on changes to the user records?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 01:04 PM
Agree with James.
Create a business rule on the sys_user table to check the flag that you have created for "Is Manager".
If the value is true, run a Glide query to check the group membership table (sys_user_grmember) to see if they user already exists. If not, create a new record.
If the value is false, run a Glide query (same as above) and remove the record if they exist in the table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 12:48 PM
I've typically done this using a business rule that checks for changes to the field on the user record (or whatever the criteria would be).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 01:04 PM
Agree with James.
Create a business rule on the sys_user table to check the flag that you have created for "Is Manager".
If the value is true, run a Glide query to check the group membership table (sys_user_grmember) to see if they user already exists. If not, create a new record.
If the value is false, run a Glide query (same as above) and remove the record if they exist in the table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 02:40 PM
Just being nosey, but what is the purpose of the group ?
We control everything via LDAP groups, but I can see some uses for an option like this
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 06:40 PM
Julian, in our instance we don't import our LDAP groups and keep them local in ServiceNow. It cuts WAY down on overhead of managing everything for us (we have over 400 AD groups, most which don't align the way we want to organize in ServiceNow).
That said, we wanted to limit some Catalog items specifically to Managers, but I don't want to manage the Managers group, so this seemed like a logical way of handling it.