2 Replies Latest reply on Sep 11, 2015 11:18 AM by Aman Habib

    if Statement error

    Aman Habib

      I was hoping somebody could help me out with this issue.

       

      I have a code in for one of my fields but needed to make an "if" statement for a few possible results.

       

      This is the original code that I had:

       

      var a = this.getField("Text8");

      var b = this.getField("Text59");

      event.value = Round((a.value/b.value), 1);

       

       

      If the field said 77.3 then i wanted to change it to 77.4. I thought that adding the following if statement to code would work but it just displayed "77.4" in the field.

       

      if (event.value = 77.3) {

      event.value = 77.4 ;

      }



      I'm still learning JS so I'm not sure what everything means. All the help would be greatly appreciated.

       

      Thanks