There is some info on diemnsions in the dimensionInfo array:
Is qCardinal what you are after? Use the dubugger to explore what is in the structure.
Doing this just on load seems not a good idea... What if the user makes a selection that excludes Q2, Q3, Q4? Or if he already has made such a selection when the extension first loads and then clears it?
Hope this helps