View Single Post
Old 06-02-2017, 01:39 AM   #12
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,133
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by stuckinoh08 View Post
So I am looking to do what the OP and sort series correctly with decimals. Currently I am using the following plugboard:

Code:
program:no_decimal = template('{series}{series_index:0>2s| | - }{title}');has_decimal = template('{series}{series_index:0>4.1f| | - }{title}');contains(field('series_index'),'\.',has_decimal,no_decimal)
Now, for all intents and purposes this works, except for one small caviat... When sorting a series of decimals, it sorts the whole number last. What I mean by this is this:

Series_Name 01 - Title
Series_Name 02.1 - Title
Series_Name 02.2 - Title
Series_Name 02 - Title
Series_Name 03 - Title

Now this isn't a huge issue, at least they a grouped together, and not 10 books apart, but it is a minor annoyance. I thought I would give Post #7's solution a try and unfortunately, it still sorts in the same manor.

Any advice?
This is on the device?
ASCII sort rules usually prevail The shorter string version ( without the .# )should be first

I know (the hard way ) the Kindle treats a - before a number as a minus, so you get a descending order -5, -4,-3,-2..
theducks is offline   Reply With Quote