Column sorting problem

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Column sorting problem

Post by prino »

This concerns XY V14.20.0201

I've got a folder that contains the following five columns:
  • Name
  • Size
  • Type
  • Modified
  • Attr
The folder has two sort keys,
  1. Modified (Descending)
  2. Type (Ascending)
and this sort order is saved as the Folder View

The problem is that with this sort order, some files are sorted first on the "Type" and only then on "Modified", i.e. files with modifications dates "now" (where "now" means more recent than any others) do not end up at the top of the screen! Some further experimentation leads me to believe that once I've done this major-minor (Modified/Type) sort, there is no way of removing either of these fields from some internal sort order variable by trying to sort on only one of them.

However, once I click on any of the other three (Name/Size/Attr) and follow that by a click on "Modified", the sort order is correct and the "now" files are at the top (or bottom).

The attached WinRAR archive, which contains 7 files (stored with all three NTFS dates, just in case) shows the problem.

If you extract it, it will create a folder 01-data, containing

country.wiki, 9,447 bytes, 2014-07-01 14:04:00
days.h-h, 32,949 bytes, 2014-07-01 14:04:00
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00

Click on any of the columns and the data will be sorted in Ascending order, except for, and this may be significant, "Modified" which is sorted in Descending order.

Sort on "Modified" as major and then sort on Type (shift-click) as minor. The order will be

days.h-h, 32,949 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00
country.wiki, 9,447 bytes, 2014-07-01 14:04:00
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00

and that is wrong, wrong, wrong, tycona.txt should be at the top as "Modified" is the major sort field. Having set this major/minor sort order, now sort on "Modified", (do it twice) and the result will be

days.h-h, 32,949 bytes, 2014-07-01 14:04:00
tycona.txt, 12,207 bytes, 2014-07-01 20:54:19
tz.txt, 5,629 bytes, 2014-07-01 20:46:48
log2014.wiki, 9,307 bytes, 2014-07-01 14:04:00
year.wiki, 14,155 bytes, 2014-07-01 14:04:00
country.wiki, 9,447 bytes, 2014-07-01 14:04:00
tzcross.txt, 4,541 bytes, 2014-06-13 19:01:00

Which is still wrong, the two .txt files should be at the top

Now sort on "Name", then sort on "Modified", and this time the sort on "Modified" is correct. Now shift-click on "Name" and discover that once again the major (="Modified") column is ignored, and the two .txt files that should be at the top (or bottom) are in fact sorted somewhere in the middle.

Well enough explained?
To see the attached files, you need to log into the forum.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

Confirmed!

EDIT: Ok, confirmed, but it is a feature! On secondary sorting (and on grouping) the *time part* of the file date/time is ignored. I made it like this because otherwise you hardly get any groups (rarely have two files exactly the same date stamp).

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Column sorting problem

Post by prino »

admin wrote:Confirmed!

EDIT: Ok, confirmed, but it is a feature! On secondary sorting (and on grouping) the *time part* of the file date/time is ignored. I made it like this because otherwise you hardly get any groups (rarely have two files exactly the same date stamp).
If it's a feature, it's a very bad feature. Can you please consider providing a tweak that allows using the full timestamp for all sorting?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

No, it's a good feature, otherwise I would not have added it.

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Column sorting problem

Post by prino »

No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Column sorting problem

Post by PeterH »

prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Column sorting problem

Post by LittleBiG »

I feel still there is a small bug here. (I understand this feature and agree that it is a good one! I hope prino also will see it soon.)
I have a primary sorting by Modified and a secondary one by Type. Then I click on the column header of Modified. The secondary sort will be switched off (small triangle disappears from Type) and the sorting (by Modified) will be reversed. But the sorting feels as if the secondary sort would be alive, and sort the files accordingly (you can check it clicink Modified more times). I have to change the sorting to any other column (for example Name), then back to Modified, to achieve the expected normal sorting.

My guess is that secondary sorting isn't switched off when you click on the primary sort column. So the little triangle should remain, no?

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Column sorting problem

Post by prino »

PeterH wrote:
prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.
All times are accurate, microsecond portions are guaranteed to be 000000!

In my case all files in the directory are set with a touch program to exact timestamps, down to the micro-second, i.e. all of them, except the ones I'm concerned about, and in such cases Don's "feature" is of no use - many of the files come from PDS'es on z/OS and the program (on z/OS) that builds the, more gobbledygook, AMATERSE'd XMIT datasets also builds a BAT file to apply the z/OS dates to the resulting files on windows, and that results in nice "clean" timestamps where a full sort would be OK.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

LittleBiG wrote:I feel still there is a small bug here. (I understand this feature and agree that it is a good one! I hope prino also will see it soon.)
I have a primary sorting by Modified and a secondary one by Type. Then I click on the column header of Modified. The secondary sort will be switched off (small triangle disappears from Type) and the sorting (by Modified) will be reversed. But the sorting feels as if the secondary sort would be alive, and sort the files accordingly (you can check it clicink Modified more times). I have to change the sorting to any other column (for example Name), then back to Modified, to achieve the expected normal sorting.

My guess is that secondary sorting isn't switched off when you click on the primary sort column. So the little triangle should remain, no?
Indeed, good find! Fix comes.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

prino wrote:
PeterH wrote:
prino wrote:No, I'm sorry but I strongly have to disagree here!

Either you sort on a field, or you don't sort on a field, not you sort on a field, but once you add another field, you only sort on a part of the first field.
But you've understood why Don made it this way?

And you don't show complete time info: it's exact to about a microsecond. If you first sort by this - you will not need a secondary sort.
All times are accurate, microsecond portions are guaranteed to be 000000!

In my case all files in the directory are set with a touch program to exact timestamps, down to the micro-second, i.e. all of them, except the ones I'm concerned about, and in such cases Don's "feature" is of no use - many of the files come from PDS'es on z/OS and the program (on z/OS) that builds the, more gobbledygook, AMATERSE'd XMIT datasets also builds a BAT file to apply the z/OS dates to the resulting files on windows, and that results in nice "clean" timestamps where a full sort would be OK.
I'll add tweak for it. Kanzen, baby! :beer:

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Column sorting problem

Post by LittleBiG »

admin wrote:Indeed, good find! Fix comes.
I have just tried the fix. It means there is no need this line in the help file anymore, because the single click without SHIFT works in the same way.
Tip: You can remove any secondary sorting and keep the current primary sort order: Hold SHIFT and click the primary sort column.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

Oh yes, seems you are right.

admin
Site Admin
Posts: 67282
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Column sorting problem

Post by admin »

prino wrote:This concerns XY V14.20.0201 ...
So, does it work now as you wished?

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Column sorting problem

Post by prino »

admin wrote:
prino wrote:This concerns XY V14.20.0201 ...
So, does it work now as you wished?
Just arrived in Vilnius, and will have to wait until we're visiting the in-laws, our internet (on the borrowed wireless connection of the neighbours - with their blessing) is just to slow and inconsistent to download anything.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

prino
Posts: 358
Joined: 18 Mar 2012 21:14
Location: Vilnius, Lithuania
Contact:

Re: Column sorting problem

Post by prino »

Is there a tweak or is there no tweak to use the full timestamp under all circumstances, all the sort items I've tried changing in the configuration file don't seem to solve that files with a time of 00:00:00 still end up between files with a time of 12:00:00 after adding a secondary sort field.

If there is one, what is it, I cannot find it in the myriad of options - now on V14.30.0301.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy (& W7-64 Pro @ 100%)
At last, a tiny bit of programming here... :mrgreen:

Post Reply