Manipulating card order as displayed by the browser?

brizobrizo's Avatar

brizobrizo

06 Dec, 2015 05:33 PM

Currently making flashcard for the Thai alphabet.

Cant work out how to arrange the card order as displayed by the browser.

I don't want the cards in alphabetical order, but rather in the order they appear in the textbook I'm using.

  1. 1 Posted by brizobrizo on 06 Dec, 2015 06:09 PM

    brizobrizo's Avatar

    I can get it working like this ..but its an ugly solution:

  2. Support Staff 2 Posted by Damien Elmes on 07 Dec, 2015 04:02 AM

    Damien Elmes's Avatar

    Anki remembers the order you add cards - you can right click on the columns to add the created column, and then sort on that. If you want to add the items out of order, you could add a separate field with a number to describe order.

  3. 3 Posted by brizobrizo on 10 Dec, 2015 12:28 PM

    brizobrizo's Avatar

    Thanks for the reply,

    The problem with using 'added' for sort order, its not easy to change the order at later date.

    Using a number for the sort order works ok until double digits, any cards above 9 are not in order.

    I'm guessing the sort code is only processing the 1st character of the string/number?

  4. 4 Posted by brizobrizo on 10 Dec, 2015 12:30 PM

    brizobrizo's Avatar

    Descending order!

  5. Support Staff 5 Posted by Damien Elmes on 11 Dec, 2015 09:15 AM

    Damien Elmes's Avatar

    Anki is only able to sort the sort field in natural number sort order if it contains nothing but numbers - if you've added other text as well, it will sort in alphabetical order.

  6. 6 Posted by brizobrizo on 11 Dec, 2015 10:05 AM

    brizobrizo's Avatar

    On a programming level, standard practice dictates the order algorithm should be processing left to right, as many characters as required, to ascertain where in the deck the card should be placed.

    However, even with 'numbers only' in the sort field, the order is still wrong.

    It seems happy sorting by numbers when the field contains both letters and numbers, it's only when the numbers go into double digits the problem appears:

    ps
    not trying to be contentious, I appreciate the help, just trying to narrow it down for you support guys

  7. Support Staff 7 Posted by Damien Elmes on 14 Dec, 2015 02:45 AM

    Damien Elmes's Avatar

    The sorting is done at the database level, which is only able to sort in numeric order if the fields contain nothing but digits. Chances are you have some HTML in one or more of your fields - you could export to a text file and look through that field to see.

  8. 8 Posted by brizobrizo on 14 Dec, 2015 07:47 PM

    brizobrizo's Avatar

    That was the right nudge, turns out there was varying amounts of whitespace on the right-hand side of some numbers.

    Thanks!

  9. Support Staff 9 Posted by Damien Elmes on 15 Dec, 2015 11:40 AM

    Damien Elmes's Avatar

    Glad to hear it's working now!

  10. Damien Elmes closed this discussion on 15 Dec, 2015 11:40 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac