6 Replies Latest reply on May 19, 2015 8:44 AM by try67

    I have the code, I can't figure out how to write to a text field in Adobe.


      I want to find if a number is in a certain range, if it is within that range I want it to assign a field a certain percentage.


      Here is the code:



      // Define Vars

      var TotalScore = this.getField("Total_Scores").value;

      var HighA = this.getField("Range_2").value;

      var LowA = this.getField("Range_1").value;

      var HighB = this.getField("Range_4").value;

      var LowB = this.getField("Range_3").value;

      var HighC = this.getField("Range_6").value;

      var LowC = this.getField("Range_5").value;

      var HighD = this.getField("Range_8").value;

      var LowD = this.getField("Range_7").value;



      //This is the increase

      var Rate1 = this.getField("Salary_1").value;

      var Rate2 = this.getField("Salary_2").value;

      var Rate3 = this.getField("Salary_3").value;

      var Rate4 = this.getField("Salary_4").value;



      //This is where the end Value will go

      var IncreasePer = this.getField("Increase_Per").value;



      //if Statement

      if (TotalScore >= LowA && TotalScore <= HighA){

      IncreasePer.value= Rate1;


      if (TotalScore >= LowB && TotalScore <= HighB){

      IncreasePer.value= Rate2;


      if (TotalScore >= LowC && TotalScore <= HighC){

      IncreasePer.value= Rate3;


      if (TotalScore >= LowD && TotalScore <= HighD){

      IncreasePer.value= Rate4;




      I am trying to do a Merit Increase form where the Employee's overall score puts them into 1 of 4 categories. The percentage numbers are just random numbers that we came up with to test the form.


      FromTo% of Raise


      Any help or Insight is appreciated!