- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 06:20 PM
Is there a way to create a report on the incident subcategories and assignment lookup rules (dl_u_assignment) and find out which subcategories is missing from the assignment lookup rules?
I tried creating database view but I am getting thousands or records
An suggestions on how to achieve this solution?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 07:10 PM
Hi @GB14 ,
if you just want to find out which choices are missing in the assignment lookup rules you can run a background script and find out
var arrChoices = []
var chGr = new GlideRecord("sys_choice");
chGr.addEncodedQuery("name=incident^element=subcategory");
chGr.query();
while (chGr.next()) {
var aGr = new GlideRecord('dl_u_assignment');
aGr.addEncodedQuery('subcategory=' + chGr.getValue('value'));
aGr.setLimit(1);
aGr.query();
if (!aGr.hasNext()) {
var tempObj ={};
tempObj.choiceLabel = chGr.getValue('label');
tempObj.choiceValue = chGr.getValue('value');
tempObj.choiceSysId = chGr.getValue('sys_id');
arrChoices.push(tempObj);
}
}
gs.print(JSON.stringify(arrChoices))
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 06:49 PM
Hello @GB14
Did you try normal standard reporting on Assignment lookup table ? You can just add relevant filters. Can you share screenshot what you did in this aspect ?
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2025 07:10 PM
Hi @GB14 ,
if you just want to find out which choices are missing in the assignment lookup rules you can run a background script and find out
var arrChoices = []
var chGr = new GlideRecord("sys_choice");
chGr.addEncodedQuery("name=incident^element=subcategory");
chGr.query();
while (chGr.next()) {
var aGr = new GlideRecord('dl_u_assignment');
aGr.addEncodedQuery('subcategory=' + chGr.getValue('value'));
aGr.setLimit(1);
aGr.query();
if (!aGr.hasNext()) {
var tempObj ={};
tempObj.choiceLabel = chGr.getValue('label');
tempObj.choiceValue = chGr.getValue('value');
tempObj.choiceSysId = chGr.getValue('sys_id');
arrChoices.push(tempObj);
}
}
gs.print(JSON.stringify(arrChoices))
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya