2 Replies Latest reply on Mar 23, 2017 2:27 AM by steft66579364

    I have 4 off fields that have to be filled in with numerical data. All the fields need to to have less than 20, when they are less than 20 each ,a fifth field is filled in automatically with Pass otherwise the fifth field has fail writen into it

    steft66579364

      Hi,

       

      I have written a script to auto populate a 5th field, I have 4 fields each with less that 20 to be put into them, if all 4 fields have less that 20 (each) then the 5th field is populated with Pass, if any of the 4 fields have more that 20 in it then the 5th field is populated with fail.

      I works sort of because if I change the value of var d then I can get pass or fail into the 5th field, if I change any of the other fields there is no change to the 5th field

       

      Can someone help, please

       

      var a = getField("450").value;

      var b = +getField("350") .value;

      var c = +getField("250").value;

      var d = +getField("stroke end0").value;

      if (a,b,c,d<=20) {

      event.value = "Pass";

      } else {

      event.value ="Fail";

      }

       

      Thank you