View Single Post
Old 12-15-2014, 12:55 AM   #3
Metaxil
Member
Metaxil began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2011
Device: iphone 4
That worked (with a modification and a fix). You forgot to put #review as '#review' (easily fixed) and I added a format_number at the beginning so I didn't have a 6 decimal answer.
The modified formula for anyone else interested

Code:
program:format_number(
r = test(field('#chapters'),ifempty(field('#reviews'),'0'),'0');
c = ifempty(field('#chapters'),'1');ans = divide(r,c); 
cmp(ans,0,'','',ans),"{0:5.1f}")
I removed the comments, as they are explained above, for anyone interested. eschwartz, I appreciate your help.
Metaxil is offline   Reply With Quote