Breakdown mapping script not setting values properly

SBratcher
Tera Expert

I am trying to create a dashboard widget that will show how many RITMs were submitted with each of the options specified in one of two variables.

 

I used the details from this older post to create my script, https://www.servicenow.com/community/platform-analytics-forum/how-to-create-breakdowns-on-catalog-va...

 

SBratcher_0-1670944627027.png

the gs.info output shows appropriate RITM numbers and topics and the scorecard for the indicator lists all of the available options, so the script is definitely getting the right data, but the indicator scores are all showing up in the catch-all "other" breakdown item rather than the appropriate topic.

 

Does anyone have any idea where I might have gone wrong? The only other scripted mapping I have written used buckets so this is a bit new.

13 REPLIES 13

Sebas Di Loreto
Kilo Sage
Kilo Sage

@SBratcher 

So the screen you shared is the script used for a certain "breakdown mapping".

I assume you assigned that "breakdown mapping" to a breakdown record, let's call it "topic type" since that is your intention when displaying the indicator right?

 

I think the most important question is what is the breakdown source for the breakdown record? I think that is where the mismatch is. Can you share the screen of the breakdown source?

 

You can also study this out of the box example: /pa_scripts.do?sys_id=03be9aa2eb23310065deac6aa206fe3c

Check the breakdown source that is using.


If I helped you with your case, please click the Thumb Icon and mark as Correct.


Sorry, I should have included the breakdown source originally as well, I also created it based on the same post's instructions:

 

SBratcher_0-1670949642609.png

That example doesn't exist in our instances, but I will check it out when I get my PDI awake. 

Mmmm.... I am not sure that breakdown source is right.

So, if you go to the question_choice table with question_choice.list on the left nav and filter it with your conditions what do you get. You can try the second condition with this if you want: /question_choice_list.do?sysparm_query=question.nameLIKEtype_of_assistance


If I helped you with your case, please click the Thumb Icon and mark as Correct.


It loads exactly the choices that I would expect for that source. All of the answers that are available on those variable questions, the same things that the script is saving to the log and creating as options in the scorecard.