Sort by more criteria
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Sort by more criteria
Normally when I sort a list by say "extension", the list is sorted by extension first and then by name. This I guess is a default set up.
In excel for example, there is this nice option to sort columns by Column A then by Column B and so forth.
Similarly in XY I would like to sort files by extension and then by size and then by created etc which would make my life easier at times.
I am sure some of you have come across huge lists where sorting by one criterion is too basic to figure out something. Just wondering if its just me.
In excel for example, there is this nice option to sort columns by Column A then by Column B and so forth.
Similarly in XY I would like to sort files by extension and then by size and then by created etc which would make my life easier at times.
I am sure some of you have come across huge lists where sorting by one criterion is too basic to figure out something. Just wondering if its just me.
-
lukescammell
- Posts: 744
- Joined: 28 Jul 2006 13:15
- Location: Kent, UK
- Contact:
Not a deal breaker for me, but it is certainly something that I think at least once every month without fail - sometimes several times in a day. Don't ask me for specifics on when this would have been useful as I really don't recall, but I certainly keep thinking about this one...
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)
Windows 10 Pro x64 (everywhere except phone…)
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Yes, it's useful. Actually I DO sort by secondary criteria, but that's always hard-coded to "Name". To make it soft on-demand is of course better.
I won't have the time to do it now, but as for the interaction: how about holding Shift while clicking a column header to make this column the 2nd criterion?
I won't have the time to do it now, but as for the interaction: how about holding Shift while clicking a column header to make this column the 2nd criterion?
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Nice idea. I was thinking of something similar.admin wrote:Yes, it's useful. Actually I DO sort by secondary criteria, but that's always hard-coded to "Name". To make it soft on-demand is of course better.
I won't have the time to do it now, but as for the interaction: how about holding Shift while clicking a column header to make this column the 2nd criterion?
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
admin wrote:Yes, it's useful. Actually I DO sort by secondary criteria, but that's always hard-coded to "Name". To make it soft on-demand is of course better.
I won't have the time to do it now, but as for the interaction: how about holding Shift while clicking a column header to make this column the 2nd criterion?
And the proposed Shift would be fine with me...however: What about the menu method for us T-P/mouse'rs? I'd say we add a sub-menu to the View>Curr Tab>Sort By which would simply be another "Sort By" that would have the primary sort field grayed out to prevent its selection...this could possibly expanded to one futher level using same method IF three levels of sort would be possible...but the most important is a user-defined minor sort!
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
-
jacky
- XYwiki Master
- Posts: 3106
- Joined: 23 Aug 2005 22:25
- Location: France
- Contact:
Yeah, if it can be done that would be a nice thing, yesadmin wrote:I won't have the time to do it now, but as for the interaction: how about holding Shift while clicking a column header to make this column the 2nd criterion?
Proud XYplorer Fanatic
-
Pagat
- Posts: 307
- Joined: 09 Oct 2007 21:23
- Location: Austria
If you (Don) use a stable sorting algorithm then why even sort by secondary criteria on each click?
With a stable algorithm and sorting only by one criteria each time, there would be no need for any interface:
If you want to have your list sorted "by Date then by extension", simply click first on "extension" and afterwards on "Date" -> Files that are from the same date would remain in their previous order (in this case "by extension").
This way you can also easily sort by three (or even four, five, ...) criteria; simply by clicking onto the according headers one after another.
With a stable algorithm and sorting only by one criteria each time, there would be no need for any interface:
If you want to have your list sorted "by Date then by extension", simply click first on "extension" and afterwards on "Date" -> Files that are from the same date would remain in their previous order (in this case "by extension").
This way you can also easily sort by three (or even four, five, ...) criteria; simply by clicking onto the according headers one after another.
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
I use Quicksort (not stable). But no problem, I have secondary sorting built in already, and it's extremely fast.Pagat wrote:If you (Don) use a stable sorting algorithm then why even sort by secondary criteria on each click?
With a stable algorithm and sorting only by one criteria each time, there would be no need for any interface:
If you want to have your list sorted "by Date then by extension", simply click first on "extension" and afterwards on "Date" -> Files that are from the same date would remain in their previous order (in this case "by extension").
This way you can also easily sort by three (or even four, five, ...) criteria; simply by clicking onto the according headers one after another.
FAQ | XY News RSS | XY X
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
And how would this work for someone who wants to use menu options strictly?Pagat wrote:With a stable algorithm and sorting only by one criteria each time, there would be no need for any interface:
This way you can also easily sort by three (or even four, five, ...) criteria; simply by clicking onto the according headers one after another.
Also, if I've decided to totally redo my sort seq, under your solution, i'd likely have to refresh my list first to undo any prior seq...plus there needs to be some method to indicate which field is the main/major field...so as proposed, click would be major, shift+click is minor...which solves the problem.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
-
Pagat
- Posts: 307
- Joined: 09 Oct 2007 21:23
- Location: Austria
with a stable algorithm it would be "first click -> minor", "second click -> major". you are right, there wouldn't be any visual indicator which of the fields is the minor (out of the box; of course it could be added...)j_c_hallgren wrote:plus there needs to be some method to indicate which field is the main/major field...so as proposed, click would be major, shift+click is minor...which solves the problem.
anyway, since Don is using QuickSort and he has already figured it out, it's obsolete to think about the "stable way" anymore.
But: Is "Name" now used as third criterion or are only two criteria used? Because if two files are the same for both criteria their order would be "random" if no third criterion (name) comes into place, right?
OS: Windows 11, 64-bit, Version 25H2, Build 26200.8655 (10.0), AMD64
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)
Monitor: 1/2 (Primary) Primary Screen DPI: 96 (100%)
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
I am not sure, but I assume/expect so. Just like how currently the secondary sort is hard-coded to "Name".Pagat wrote:But: Is "Name" now used as third criterion or are only two criteria used? Because if two files are the same for both criteria their order would be "random" if no third criterion (name) comes into place, right?
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
I would think we'd want some field (like name) to be the hidden last sort field so that results wouldn't change if one redid sort..that could cause user confusion...
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Code: Select all
+++ List: Added secondary sorting.
XYplorer Beta Club