10 Replies Latest reply on Jun 7, 2013 9:20 AM by glvmlss01

    The value entered does not match the format of the field

    glvmlss01 Level 1

      I have a PDF I have created for pay increases (i am very new to this),  i keep getting the error message "the value entered does not match the format of the field [Pay4]"

       

      My fields are listed as:  Pay 1 is the current rate, Pay 2 is the new rate, Pay 3 is the amount of increase and Pay 4 is the % of increase.

       

      Here is the calc script for Pay3:

       

      var P1 = this.getField("Pay1").value;

      var P2 = this.getField("Pay2").value;

      var D1F = 0;

      if (P1<=P2) {

         D1F = P2-P1}

      else {

         D1F = P1-P2}

      this.getField("Pay3").value = D1F;

       

      and the scrip for Pay4:

       

      var P1 = this.getField("Pay1").value;

      var P2 = this.getField("Pay2").value;

        if (P1 === 0) {P1 =1}

        if (P2 === 0) {P2 =1}

      var P3R = P1/P2*100;

      var PERC3NT = 100 - P3R;

      this.getField("Pay4").value = PERC3NT;

       

      Once i enter the script in for Pay 4 i get the error message and it pops up after everything I enter.

       

      Thanks for your help.