What exactly is the behaviour of dimension.top in case of array dimensions?
It seems to be sorting on the first value in the array across all rows.
Shouldn't it be sorting on all values putting at top the record that includes the highest value anywhere in the array?
It should return an array with the same number of elements as there are array elements in all rows. Each row will appear once for each element in its array, ordered by the value of that element. If you are seeing different behavior, please post an example and I or someone else will be happy to take a look.