5 Replies Latest reply on Apr 28, 2016 9:03 AM by antragos

    I have three numeric fields that must be calculated and then added.

    antragos

      Can you help me ?

      I have three numeric fields that must be calculated and then added.

      Field 1 = Value * 24

      Field 2 = Value * 2

      Field 3 = if value => 15 or =<30 the value = 2 else = 0

      Field Total = F1 + F2 + F3

      I tried this script but does not work

       

       

      SCRIPT FIELDS IN ADDITION 3 1 CALCULATED

      // Get field value

      var v1 = getField ("Num7"). value;

      var v2 = getField ("NUM8"). value;

      var v3 = getField ("Num9"). value;

       

      // Set number this field value

      if (v3 => 15 && v3 = <30) {event.value=2}

      else {event.value = 0}

      event.value = v1 * 24 + v2 * 2 + v3;

       

       

      Thank you in advance