Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2016, 07:08 AM   #1
Vortex
Groupie
Vortex began at the beginning.
 
Vortex's Avatar
 
Posts: 171
Karma: 10
Join Date: Dec 2008
Device: Likebook Mars
Numerically sort custom column?

I have a text custom column in Calibre that has text followed by zero to three digits at the end. ie.

texta 1
texta 9
texta 12
textb 1
textb 2
textc 15
textc 37

How do I get the column to arrange numerically without having to add whole strings of zeros to the front of every digit or have the digits surrounded by []?

Thanks

Last edited by Vortex; 06-22-2016 at 08:35 AM.
Vortex is offline   Reply With Quote
Old 06-22-2016, 10:26 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Try setting the tweak Recognize numbers inside text when sorting (ID: numeric_collation) (Preferences / Tweaks). It might do what you want, but it might have side effects you don't want.

BTW: putting [] around the numbers won't do anything useful unless you change the column type to series.
chaley is offline   Reply With Quote
Advert
Old 06-22-2016, 11:28 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You are seeing the traditional 'Alpha-Numeric' (datatype) sort because you used a Text field.

Chaley's, 'Series" solution works because underneath the DB covers, there are 2 pieces that sort

OTOH
You can't have a (tag type) comma separated list in a Series type.
So You must pad numbers with 0's or you use a Single 'Series'
theducks is offline   Reply With Quote
Old 06-23-2016, 01:04 PM   #4
Vortex
Groupie
Vortex began at the beginning.
 
Vortex's Avatar
 
Posts: 171
Karma: 10
Join Date: Dec 2008
Device: Likebook Mars
Quote:
Originally Posted by chaley View Post
Try setting the tweak Recognize numbers inside text when sorting (ID: numeric_collation) (Preferences / Tweaks). It might do what you want, but it might have side effects you don't want.

BTW: putting [] around the numbers won't do anything useful unless you change the column type to series.
Ah! Chaley, you're a star. Thank you. I didn't want the numbers in square brackets. That tweak worked perfectly.
Vortex is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column Sort Heyou Library Management 6 10-15-2015 04:45 AM
Custom COlumn: Author Sort - Series BzKevin Library Management 4 10-20-2014 09:27 AM
New Custom Column definition for new sort kaufman Calibre Companion 8 08-13-2014 10:54 AM
Manual Sort or Sort by custom column Dethmaul Marvin 2 04-28-2014 11:54 AM
Is it possible to sort a custom column like authors or title? arspr Library Management 2 03-15-2011 04:44 PM


All times are GMT -4. The time now is 07:20 AM.


MobileRead.com is a privately owned, operated and funded community.