Quote:
Originally Posted by China Diapers
I have created the below template:
program:format_number(test(field('#duration'),divi de(field('#page_count'),field('#duration')),0),"{0 :5.1f}");
What I was intending it would do is return 0 where the 'duration' field is blank (thereby avoiding division by zero) else the quotient of page count divided by duration value.
What is actually happening is the result is never 0, it is either the quotient or a division by zero error, so it appears the test is ignored or I am misunderstanding the purpose of the test function.
Screenshot attached for context.
Any ideas?
|
That said, the below returns true where the duration value is populated, and false where it is not as I would expect.
program:test(field('#duration'),"True","False");