View Single Post
Old 10-09-2022, 08:43 AM   #1
Katja_hbg
Groupie
Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.
 
Posts: 183
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
how to sort numeric

Inspired from a thread «how to search for only the first occurency ...», I tried something like «oldes book of an author»... and I made it ... almost.

As «oldest» is referring to my library, I search for that book with the lowest id of an author. I search book by author and sort them by id. But that sorting is alphabetic and therefore 1060 comes before 888.

In a template search I use
...
books_of_author = book_values ('id', searchstring, ',' , 99) ;
list_split (list_sort (books_of_author, 0, ','), ',', 'book_of_author_id');
...

Can someone help, to get the list of ids ordered numeric?
Katja_hbg is offline   Reply With Quote