cancel
Showing results for 
Search instead for 
Did you mean: 

Can I sort a collection using 2 levels?

Gulam_AbbasAlwa
Level 3
Like we do in excel, is it possible to give 2 levels? So, sort collection by column A and then Column B.  
5 REPLIES 5

John__Carter
Staff
Staff
Yes, try [Column Name With Spaces] ASC, ColumnNameWithoutSpaces DESC

Gulam_AbbasAlwa
Level 3
Hi John, I tried what you suggested but that didn't work. I'm attaching a screenshot of my collection. The objective is to get the latest row for each reference number using. So I'm trying to sort by reference and date time. What would you suggest?

John__Carter
Staff
Staff
I would have thought ""Reference,ReceivedDateTime"" would work as a sort, but you'd still then need to loop through to pick out each latest reference.

TomaszAdamski
Level 5
If the above do not work then you can just try sorting twice. First by Column B and then by Column A. Works fine :) (at least I tested this at version 5.0.30)

Gulam_AbbasAlwa
Level 3
Thanks John. It worked