2 Replies Latest reply on Jun 2, 2014 7:09 AM by rachelw0908

    I have tried everything! How to change the color of text based on value Acrobat 9

    rachelw0908

      How can I change the color of the text to red if the value is "Unacceptable" and leave it green for all other rating values? Where can I put it for it to work? Also, Unacceptable is set to an export value of 0.

       

      var n = +this.getField("NumericSummaryRating").value;
      var a = +this.getField("Rating1.0").value;
      var b = +this.getField("Rating1.1").value;
      var c = +this.getField("Rating1.2").value;
      var d = +this.getField("Rating1.3").value;
      var e = +this.getField("Rating1.4").value;

       

      if (n == 0) {
          event.value = "Not Rated";
      } else {
      if (a==0 || b==0 || c==0 || d==0 || e==0) {
          event.value = "Unacceptable";
      }
      else {
          if (n>0 && n < 3.0){
              event.value = "Unacceptable";
      }
          else if (n >= 3.0 && n < 3.6) {
              event.value = "Successful";
          }
          else if (n >= 3.6 && n < 4.6) {
              event.value = "Excellent";
          }
          else if (n >= 4.6) {
              event.value = "Outstanding";
              }
      }
      }