@chaley, thank you for so much your help! GPM does look much less confusing.
So now I am using your template for "Pages read" and a similar one for "Pages left":
Code:
program:
progress = field('#progress');
percent = divide(progress, 100);
pagesread = multiply(field('#pages'), percent);
test(progress, pagesread, '');
Code:
program:
progress = field('#progress');
left = subtract(100, progress);
percent = divide(left, 100);
pagesleft = multiply(percent, field('#pages'));
test(progress, pagesleft, '');
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.
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.