Blank when zero

Hi guys,

I have a list/form where I would like to format this one column/field as blank if it has the value 0 (zero) It's only numeric and I only need to blank out the zero. I've tried various things with sprintf() and not found any combination that does it. Any ideas?

Best regards,
Arnor
 
Nope, I can't think of anything with printf.

I seem to recall I've done this in the past with a custom template, but that's a big hammer for a small issue.

Another way to do it would be to create a calc element. Display that in the list instead of the "real" element, and do ...

return empty('{yourtable___yourelement}') ? '' : '{yourtable___yourelement}';

... which should render an empty string if 'yourelement' is 0.

Set "Calc on save only" to No.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top