If I have a two dimensional array like this:
and then I sort x, I get this:
That's unfortunate, as I would like Y1 to still be ordered. I know the sort is just looking at Y0, but If the sort encounters 10 or so of the same value in Y0, then the Y1 sorting will be weird like above (it seems to swap X0 with the X row in the middle of whatever array I use).
If I use this method of sorting multiple columns (to sort by Y0 then Y1), I get the same result. The methods I can find for sorting by multiple columns don't seem to work if there are too many matching values in Y.
The array I'm working with is actually about 200x14 size (using the CSV to Array plugin) but I can reproduce the dillema using the above, simpler example. In my array I'm using Y0 as an active flag/bit. I need to reverse sort by the active flag and then secondarily sort by another Y column (which denotes a category). Should I bypass the standard sort method in favor of another logic? I think I'm about to abandon the idea of sorting by active flag and just have the program traverse the active row scattered throughout the array.. and sort only one column using a swap method. It's just so much easier to debug when its sorted. Thanks for any ideas! -Steve