1 Reply Latest reply on Feb 9, 2016 1:10 AM by try67

    How do I multiply a variable by a constant with currency input?


      I am trying to multiply a variable by a constant where the variable is input as $X,XXX,XXX.XX or similar and multiplied by 0.60


      I have

      var v1 = +getField("AccountsReceivable").value

      event.value = (v1) * 0.60;


      This script works if your input for AccountsReceivable is in normal formatting without the currency symbol.


      How do I create a script that allows the currency symbol to be both part of the input and the result?

      I have tried formatting the result in various ways all resulting in different errors (NaN or nothing, etc)


      Thank you for any help!!!