2 Replies Latest reply on Jul 7, 2017 10:38 AM by Andy85

    How to create a custom script that will output a calculation but display 0 if the sum is a negative number Please Help!

    Andy85

      I am trying to create a custom javascript calculation that will do the following:

      Caculate: Subtract AGI_Total - (Deductions +Exemptions) and the result would go into the Taxable_Income field

       

      I can do this in the Simplified Field notation of the Taxable_Income field on the PDF form I am working on but what I am having trouble doing is if the sum equals a negative number, I want the Taxable_Income field to display 0. Unfortunately, I am very new at Javascript and I don't know how exactly to do this. I am using Adobe Acrobat Pro.

       

      Can someone help please?