Quote:
Originally Posted by Joanna
[...]
This works perfectly, with the exception of all books that have 1000 pages or more (regardless of whether #progress is empty or not). For those, I get a template error: invalid literal for float().
This has not worked right in my previous TPM template either. Not sure what the reason is, though.
|
Ahhh, I should have thought of that. The problem is that the "field()" function gets the data with the default formatting for that column, which in the case of #pages will include a comma between the 100s and 1000s place (2,345 instead of 2345). You should use raw_field() instead, which gets the number without formatting it. EDIT: Alternatively, change the formatting for the pages column to remove the comma.
Quote:
There is also some problem with sorting: I've chosen sorting by numbers in the column dialog but now when I try to sort, nothing seems to happen.
|
Now this is a mystery. It works fine for me. See the attached screen capture. The column "#myint" is what I used for "#pages" and "#myint2" is "#progress".