11 Replies Latest reply on Jul 6, 2017 4:48 PM by Lisonali

    Over ride a field formula if 0 is entered

    Lisonali

      Hi

       

      I am using Adobe Acrobat Pro DC (V2015.006.30097)....I am very new to Adobe Javascript and am trying to work out a formula which will over ride the formula if I type in a 0 .  It is a finance form and some amounts do not incur GST (Tax) .

       

      I have the NETT AMOUNT + GST = TOTAL

       

      I started with a very basic formula of Amount1*.1 in the GST Field and  Amount1+GST in the TOTAL field - however if GST is not added to the item and type in "0" to reflect this in the GST box, it does not allow this, it keeps adding the 10% onto the GST field.

       

      so I tried this variance in the calculation text field property (after searching the forum for some ideas)

       

      var nGST = this.getField("GST").value;

      if( nGST > 0.0) event.value = nGST * 0.10;

       

      but I am now getting an error.

       

      I would really appreciate some help

       

      Thanks