View Single Post
Old 06-26-2019, 09:00 AM   #11
Soap-dodger
Member
Soap-dodger began at the beginning.
 
Soap-dodger's Avatar
 
Posts: 14
Karma: 10
Join Date: Dec 2016
Location: United Kingdom
Device: Amazon Kindle PaperWhite 3
Quote:
Originally Posted by davidfor View Post
The one that worked for me was:

Code:
format_number(divide(words,pages), "{0:3.0f}");
But, if you do it in template mode, you need to remove the braces. So, it would be:
Code:
{:'format_number(divide(cmp(raw_field("#pages"),0,0,0,raw_field("#words")),cmp(raw_field("#pages"),0,1,1,raw_field("#pages"))), "3.0f")'}
Got it working now with your help.
Soap-dodger is offline   Reply With Quote