- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
How to detect and identify orphaned assignment groups in Incident if the group is inactive and no groupmembers present in the group table
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Can you close this thread as its different requirement. You can open new thread with proper requirement use case . I will see and check and try to help.
Thanks and Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
service desk mean incident ticket? can u state requirements.
You can post a new question, detail it out properly
Regards,
Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
If iam understanding is correct:
1) Get group with Zero members.
2)Reassign all the tickets of these group to other active group with user, so which is this group?
3) why flow designer? is it specific requirement.
4) what's the trigger daily, weekly?
This will take time to build in PDI, i suggest you to post as new question in developer forum so other can have their inputs too,
Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You are right to go to flow designer as approach.
I was just asking if it was specific business requirement to use as flow designer.
Other approach i can think is Schedule jobs.
Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JinkaH
If you want to use less code or a no-code solution, the Flow Designer is the best option.
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 @JinkaH
My basic video will be helpful for understanding the Flow Designer process.
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 @JinkaH
Thereās no direct way to do this other than using some background script.
Create a report on the Group table and then check the members.
then on incident report :
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0695912
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 @JinkaH
Did you check my response?
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 - last edited 3 weeks ago
Hi @JinkaH ,
Your use case has two requirement:
1)Inactive group AND 2) No group member
I have used background script
var orphanGroups = [];
var printed = false;
// 1. Aggregate member count per group (only sys_id ā count)
var memberCount = {};
var agg = new GlideAggregate("sys_user_grmember");
agg.groupBy("group");
agg.addAggregate("COUNT", "user");
agg.query();
while (agg.next()) {
memberCount[agg.getValue("group")] = parseInt(agg.getAggregate("COUNT", "user"));
}
// 2. Loop inactive groups + detect count = 0
var g = new GlideRecord("sys_user_group");
g.addQuery("active", false);
g.query();
while (g.next()) {
// If NOT present in memberCount ā means count is 0
var count = memberCount[g.getUniqueValue()] || 0;
if (count === 0) {
if (!printed) {
gs.print("Orphaned groups found:");
printed = true;
}
gs.print(" ā " + g.getDisplayValue("name"));
orphanGroups.push(g.getUniqueValue());
}
}
// 3. Final single list URL
if (orphanGroups.length > 0) {
var url = gs.getProperty("glide.servlet.uri") +
"sys_user_group_list.do?sysparm_query=sys_idIN" +
orphanGroups.join(",");
gs.print("List URL: " + url);
} else {
gs.print("No orphaned groups found");
}
Script Result:
Result Verification:
If you find this answer useful, please mark it as solution accepted/helpful.
Thanks and Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @Mohammed8 could you please help me with the solution of flow designer and i want to detect the groups and route that groups to service desk