|
|
Thread Tools | Search this Thread |
04-18-2023, 01:02 PM | #1 |
Addict
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
|
Feature?/Help request: Sorting composite column by a different column's value
I store Title separately from Subtitle, but in my main library view I display both using a composite column, separating them with a colon if the subtitle is set: {title}{#subtitle:|: |}
However, when sorting by this field, The Memory Librarian gets sorted next to other “The” titles, not next to titles starting with “Mem”. For my purposes, it would be nice to have another option in the custom column settings for the “Sort/search column by” drop-down. Maybe “custom” and the ability to provide my own template. Then I could use something like {title_sort}{#subtitle:|: |} to have this field behave very similarly to the built-in title field. Maybe I'm doing something silly and there's a better way to achieve what I'm after – I welcome suggestions. Thank you for reading! |
04-18-2023, 01:16 PM | #2 |
Well trained by Cats
Posts: 29,919
Karma: 55705262
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Why not just move the subtitle column to be next to Title? No need to bloat the DB (performance hit).
Title follows the sort order scheme in ID: title_series_sorting A calculated column does not have a tweak. BTW Preferences:Look&Feel:Book Details (sidebar) is where you also do this to get the details to be the same order |
Advert | |
|
04-18-2023, 03:18 PM | #3 | |
Grand Sorcerer
Posts: 11,770
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Other than @theducks suggestion, you could:
|
|
04-18-2023, 03:47 PM | #4 | |||
Addict
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
|
Your comments are both full of helpful suggestions – thank you both very much!
Quote:
2) Always good to know about more tweaks, but in this case I'm happy to leave it on library_order. 3) This is very helpful too; I used this feature to hide the Title and Subtitle fields from Book Details and put my composite column in their place before any of the other fields. Quote:
Quote:
2) Oh my gosh, there's a Sort By action. Which now lives on my search toolbar next to Saved Searches and Mark Books. (For anybody reading who didn't know you can customize your toolbars and menus, see Preferences > Interface > Toolbars & menus. I chose “The buttons on the search bar” to which I added “Sort by”.) This is perfect, exactly what I needed. I can sort by Title > Subtitle and I can save the sort as well, totally independently of my custom composite column. 3) This is great and with Action Chains I guess its usefulness is only limited by one's creativity. Nevertheless, Sort By solves my issue so well that this would be overkill for me here, but it's still very informative. Thanks again! Last edited by isarl; 04-18-2023 at 03:51 PM. |
|||
04-18-2023, 04:00 PM | #5 |
Addict
Posts: 287
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
|
One last comment, now that I've played with “Sort by” a little bit: if I were doing this frequently, using the “Sort on multiple columns” dialogue over and over, even to load a saved sort, is a bit clunky. In that case, I think a winning idea would be to combine Charles's first and second suggestions – make a new composite column using title_sort instead of title, and choose it from the “Sort by” dropdown.
In practice, I think I change my sorting pretty infrequently. Nevertheless, I thought I'd share that idea in case it helps anybody else. |
Advert | |
|
04-18-2023, 04:07 PM | #6 | |
Grand Sorcerer
Posts: 11,770
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
04-18-2023, 04:33 PM | #7 |
Custom User Title
Posts: 8,760
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
On somewhat the same topic, I've had to create custom columns just to sort series-columns. If you sort ascending, undefineds go first. But if you sort descending, the series are in reverse order. So I sort series first, then sort a composite order checking that the column has a value to make them go to the top.
View Manager is a bit of a help. It's unfortunate that it can't do a sorting-only view and leaving the columns unchanged. Last edited by ownedbycats; 04-18-2023 at 04:38 PM. |
04-18-2023, 05:01 PM | #8 |
null operator (he/him)
Posts: 20,648
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
04-18-2023, 05:25 PM | #9 | ||
Grand Sorcerer
Posts: 11,770
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
For some reason one must click the "Sort by" button before Action Chains or Favourites can "see" the menus. |
||
04-18-2023, 05:42 PM | #10 |
Custom User Title
Posts: 8,760
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Then the 'ZZZZZZ' would show up in the column, lol. I suppose I could hide it with a column icon though (I do this for Unknown authors)
|
04-18-2023, 05:44 PM | #11 |
Grand Sorcerer
Posts: 11,770
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
04-18-2023, 05:50 PM | #12 |
Custom User Title
Posts: 8,760
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Oh, I get it now. Ill experiment a bit.
|
04-18-2023, 06:30 PM | #13 | |
null operator (he/him)
Posts: 20,648
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
04-19-2023, 12:28 AM | #14 | |
Grand Sorcerer
Posts: 6,261
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
|
|
04-19-2023, 06:13 AM | #15 |
Grand Sorcerer
Posts: 11,770
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
Tags |
custom column, sorting |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with a composite column | ownedbycats | Library Management | 2 | 07-08-2020 10:06 AM |
Need help with composite column | BookJunkieLI | Library Management | 2 | 07-03-2019 11:42 AM |
Feature Request: Lock Column | CRussel | Calibre | 31 | 02-11-2018 03:25 AM |
Sorting/searching composite column causes slow startup [solved] | capnm | Library Management | 0 | 11-08-2011 11:44 AM |
Composite column or not ? | Bertrand | Library Management | 3 | 08-24-2011 01:27 AM |