2 Replies Latest reply on Nov 22, 2016 1:43 PM by davidm76220796

    Field Background won't change back

    davidm76220796

      I made a script to change the background to RED is the value was less than 4 AND greater than 0.

       

      The changing to RED works great.  Problem is when it changes to anything above 4 it stays RED and wont' go back to Orange.

       

      var G5= this.getField("G5").value;

      var C7= this.getField("C7").value;

      var C8= this.getField("C8").value;

      if((C8*G5)==0)

      {

      event.value=(C7);

      }else{

      event.value=(((G5/C8)/5280)*3600);

      }

      (function (){

      if (event.value<4 && event.value>0)event.target.fillColor=color.red;

      else

      event.target.fillColor=color.orange;

      })();