These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Script to report 0 instead of a negative number

todd0168
Registered: Oct 1 2009
Posts: 13

Is there a way to preform subtraction on two fields and either report the result or 0 if the result is a negative number? I can't seem to find anything on this.

/edit - nevermind I found it.

suewhitehead
Registered: Jun 3 2008
Posts: 232
You could do it this way;
On the Validation tab, in Custom Validation add this script:

if(event.value < 0)event.value ="0"