6 Replies Latest reply on Sep 4, 2014 12:41 PM by nepperso1

    If then script

    nepperso1

      I'm trying to write a script but it's not working correctly and not sure what i'm doing wrong.

      v1 is a combo box with 2 choices, BZ7 and BZS.  v2 is the base salary

      I'm entering the script on a 3rd field that is the annual.

       

      // Get field values, as numbers

      var v1 = +getField("Code").value;

      var v2 = +getField("Code").value;

      // Set this field value

      If (v1="BZ7")

           event.value = ((v2 *26) !== 0) ? (v2*26) : "";

      if (v1="BZS")

           event.value = ((v2*24) !== 0) ? (v2*24) : "";