how to get the group names which are having group type as SME
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sajampan
Where exactly do you want to show it — in the Assignment Group field?
If so, add this condition in the Dictionary.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sajampan,
go to Groups [sys_user_group] and set the conditions accordingly:
My instance doesn't have the SME group type so I used itil for demo purposes...
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@sajampan eventually a script:
var grSUG = new GlideRecord('sys_user_group');
grSUG.addEncodedQuery("typeLIKE1cb8ab9bff500200158bffffffffff62"); //update the group type sys ID
grSUG.orderBy('name');
grSUG.setLimit(100);
grSUG.query();
while (grSUG.next()) {
gs.info('name: ' + grSUG.getValue('name'));
gs.info('description: ' + grSUG.getValue('description'));
gs.info('active: ' + grSUG.getValue('active'));
gs.info('manager: ' + grSUG.getValue('manager'));
gs.info('parent: ' + grSUG.getValue('parent'));
gs.info('sys_updated_on: ' + grSUG.getValue('sys_updated_on'));
}
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sajampan
May you try in background script
var gr = new GlideRecord('sys_user_group');
gr.addQuery('type.name', 'SME'); // 'type' references sys_user_group_type
gr.query();
while (gr.next()) {
gs.print(gr.name);
}