Creating a Count w/GroupBy within an instance.vars.xxx
All,
Still learning how to code in JS, so please let me know if this is even possible. I have a worklfow where I pull in data from a list and send that data through a Query to create a count; the count is based on Source Code. I can display the data and see the count; it will look like this:

But, what I really want to do is have this count display in an Alert activity. I'm trying to come up with ideas on how to display this - but I'm stuck. My thought is to create a JS code to pull the fields in using "queryDef", and then create an instance.vars.xxx where I would get a Sum of each Source Code by group.
Please let me know if I'm off base.