One thing that I’m really missing is the ability to sort cards numerically in Anki. This includes the order of cards shown in the card browser and the order in which they’re presented when learning.
Anki can do numerical sorting only if the field contains only numbers, e.g. 1.
The sorting is done at the database level, which is only able to sort in numeric order if the fields contain nothing but digits. - Damien Elmes
But a field often contains alphanumeric characters when needing to distinguish several “levels”, e.g. L1E1. Currently, Anki orders it alphanumerically, which is usually not what one expect, e.g.
I think what this means is that when the database is queried for results, and asked for a sorted result, it can only provide such a sorting for numerical fields. This depends on the database backend, not really on the Anki code.
One thing that I’m really missing is the ability to sort cards numerically in Anki. This includes the order of cards shown in the card browser and the order in which they’re presented when learning.
Anki can do numerical sorting only if the field contains only numbers, e.g. 1.
The sorting is done at the database level, which is only able to sort in numeric order if the fields contain nothing but digits.
But a field often contains alphanumeric characters when needing to distinguish several “levels”, e.g. L1E1. Currently, Anki orders it alphanumerically, which is usually not what one expect, e.g.
Do you know in advance the highest-order digit needed to accommodate your likely highest alphanumeric value?
For example, if the order is 3, then you can do the following:
L001E001
L001E002
…
L010E001
L010E002
…
L011E001
L011E002
…
…
L002E001
L002E002
…
L020E001
L020E002
…
L021E001
L021E002
…
.
If there are no errors in the above, I shall be most surprised.