2 Replies Latest reply on Sep 6, 2013 9:17 AM by James A Hiltz CET

    multiple if else statement

    James A Hiltz CET Level 1

      Ok I know I have a conflict with the blank field statment however I need to have the pass statment to be grater than or equal to as indicated.

      the pass fail statment work but I can not get the blank field to work.

      Any input is greatly appreaciated.


      // Get the field values, as numbers

      var dr1 = +getField("DD_P_Required_3").value;

      var do1 = +getField("Obtained_P_3").value;

      var wd1 = +getField("WD_3").value;


      // If wd1 is blank or zero, set this field to a single space

      if(wd1 = 0) {

          event.value = "";  // Blank this field


      // If do1 is grater than or equal to dr1, set this field to pass

      if (do1 >= dr1) {

          event.value = "Pass";


      // If do1 is less than dr1, set this field to fail

      if (do1 < dr1) {

          event.value = "Fail";