4 Replies Latest reply on Feb 10, 2017 8:07 AM by Kricks1962

    Trying to multiply two fields on a purchase req and have zeros be blank

    Kricks1962

      I am new to Javascript programming in adobe.  I have a purchase req that needs to multiply the qty and the unit cost to get an extended cost.  I know I can do this in a simple calculation, but I also want fields that are zero to return blank.  the code I have so far is:

       

      event.value=(this.getField("QtyRow1").value * this.getfield("UnitCostRow1").value);

      If(event.value==0) event.value = "";

       

      neither stablemen is working.  The first does not seem to calculate and the second give me the missing; before statement 2 error...any help you can give would be great.