INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Sorting lists that have empty values  (Read 3467 times)

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Sorting lists that have empty values
« on: July 30, 2013, 09:43:03 am »

Sorting a file list is broken in a Categories View.

I'm not sure if it's related to this or not, but if sorting is going to get some attention, I'd like to bring this up also.

When sorting lists that have empty values ([Last Played] for example), the empty values never get shown at the top of the list, no matter if sorted ascending or descending.  This causes me to always have to scroll to the bottom of a list to find the items with no value.  I think empty should be treated as either the lowest or highest value so that they can move to the top of a list with one of the sorting options.
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Sorting lists that have empty values
« Reply #1 on: July 30, 2013, 10:06:15 am »

When sorting lists that have empty values ([Last Played] for example), the empty values never get shown at the top of the list, no matter if sorted ascending or descending.  This causes me to always have to scroll to the bottom of a list to find the items with no value.  I think empty should be treated as either the lowest or highest value so that they can move to the top of a list with one of the sorting options.

Tools > Options, and search "empty".
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Sorting lists that have empty values
« Reply #2 on: July 30, 2013, 10:12:55 am »

Sadly, didn't work :( 

"Unassigned" remains at the bottom for both Ascending and Descending searches.  I tried several fields, all the same, unassigned remains at the bottom.
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Sorting lists that have empty values
« Reply #3 on: July 30, 2013, 10:23:51 am »

Do you mean in a panes column?
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Sorting lists that have empty values
« Reply #4 on: July 30, 2013, 10:29:54 am »

Yes, in a panes view.  I use these views to help find unplayed TV shows or Movies or Music on my desktop, where Theater View doesn't get used much.
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Sorting lists that have empty values
« Reply #5 on: July 30, 2013, 10:32:35 am »

Use an expression to change the output value.  Example:

if(isempty([Album]), _Unassigned, [Album])

This will follow the sort order correctly.

Unassigned is always sorted last in a panes column.  It kind of make sense, in that you don't want it intermixed alphabetically, but I can see that you might want it first sometimes.
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Sorting lists that have empty values
« Reply #6 on: July 30, 2013, 10:58:01 am »

Thanks, that mostly worked.  It does put the blank ones at the top when sorting by descending order, but the rest are sorted by month, not date.  in other words, all the december are together, regardless of year, then november, etc.

Matt/Jim, sorry for the clutter, feel free to move these to a new thread.
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Sorting lists that have empty values
« Reply #7 on: July 30, 2013, 11:05:12 am »

For Date type items, change the Sort from Ascending/Descending (which is ASCII-betic) to use Last Played (a-z) or (z-z), and use the raw form of the output:

if(isempty([last played,0]), _Unassigned, [Last Played])
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Sorting lists that have empty values
« Reply #8 on: July 30, 2013, 12:28:06 pm »

Hmmm...

I tried the exact expression above, but it still sorted by month, then I switched using the field [Last Played] and sorted by Date (oldest first) and Date (newest first) and that still didn't sort right, it was a complete jumble.  I then sorted by Date Played, and it puts the most recent at the top, and leaves unplayed at the bottom, and there is no way to resort that option, and I tried most/all of these options with both expression examples you gave, and none seemed to sort with date order and unplayed at the top.

It's not that big of a deal, so there's no need for you to spend too much time trying to fix it.  i just thought it was 'buggy' behavior and was hoping Matt could 'fix' the sorting to work the way I expected, but it seems it's just not gonna work without much manipulation, and it's just not that big of a bother to worry about.

thanks again for your help though.
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Sorting lists that have empty values
« Reply #9 on: July 30, 2013, 02:06:05 pm »

Do these not do what you want?
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Sorting lists that have empty values
« Reply #10 on: July 30, 2013, 03:10:22 pm »

I don't have the option for "Last played (a-z)" it seems :(
Logged
pretend this is something funny

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Sorting lists that have empty values
« Reply #11 on: July 30, 2013, 04:28:41 pm »

You may recall, this is one of those suboptimal UI issues.  You have to first go save a Preset.  Go to the view's Sort By > Custom and Add Last Played (a-z), and click the Preset button to save it.  Then it will be available in all your views as a sort preset.
Logged
The opinions I express represent my own folly.

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Sorting lists that have empty values
« Reply #12 on: July 30, 2013, 04:48:17 pm »

Actually, I had no idea about setting the preset; I didn't even realized that was there!  When I first went to save... the preset, it came up with the name highlighted, and I clicked outside that box, and could never get the cursor inside the box again to type anything.  I had to X out of the dialog box, then hit save... again, then I was able to type the name into the box just fine.  I think there's a bug in there somewhere.

However, now that I've done that for both a-z and z-a, I have both options in the list, and it does work as you've shown.  I removed the underscore, and it still puts Unassigned at the top, which is exactly what I've wanted for years.  Actually, I just now changed it to "Never" which is what it now shows at the top of the list.

Thank you again for your help with this.  You've continued to show why you earned free meat last year, and I suspect you'll get some more this year!! :)
Logged
pretend this is something funny
Pages: [1]   Go Up