- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2023 11:09 AM
Hi all,
My question is direct. Is there any way by which we can trace the output of a scripted breakdown mapping? I have one of the similar kind that never shows an error in the logs whenever the data collector job runs but the breakdown scores are not populated. [ Breakdown is not applied while computing the score].
A scripted mapping was necessary to fulfill the business requirement since dot-walking was not an option.
Requirement: A breakdown that segregates data based upon service. parent. subcategory to use on problem based indicators. I created a scripted as given below.
Facts table - Problem
Field(s) selected - service
var result=function(current){
var gr=new GlideRecord('cmdb_rel_ci');
gr. addEncodedQuery('child='+current. business_service. toString());
gr. query();
if(gr.next()){
return gr. parent. subcategory;
}
};
result(current);
[Ignore syntax errors]
Any suggestions much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 10:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 06:20 AM
First of all, Thank you for your response on this @Bert_c1,
I don't know if my requirement was confusing as I mentioned the word 'parent'. By the word 'Parent' I meant that I am looking for the parent of a record under some relations. Actually when I created a PA widget to represent the data, it has been working as expected using the script I mentioned above and it is obvious that there will not be a score generated if the script returns null. Now my question is why the scores were generated in analytics hub and it didn't in normal score view of an indicator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 07:00 AM
Can you find records in the 'pa_scores_l1' or 'pa_scores_l2' tables? You may want to create a Support Case for your issue. But I see you accepted a solution here.