Hi, how do I start to sort a listpicker list I placed an unsorted list into a tinydb and then transfered them to a listpicker (see blocks) the listpicker displays 4,5,5+5-,6,6+,6-,7,7+,7-,8,8+8- I need 4,5-,5,5+,6-,6,6+,7-,7-7+,8-,8,8+
Hi thanks for he reply, this is a simplified version, filters are applied to the data in the tinydb so the data varies depending upon the request so the sample list is just a random possibilty.
Why the sort does not work the way you expect is explained by Peter. When you create your list using a 'number' like 8+, you are not sorting numbers, you are sorting Text and the ascii precedence rules apply.
The place where you will need to modify his code is probably in the item labeled #10 in the tutorial. Write code to modify precedence when using ( - ) text perhaps to respond as something else?
I would like to thank you all for your help and ideas. Peter's comment led me to the idea of replacing the + and minus with text then sorting and replacing back again, so after a couple of hours I have managed it. I initially replaced the - with min + with plus and added norm to the integer, I then used the sortlist extension and then replaced (or deleted) the suffixes , works a treat