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
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!!!
The formatting needs to be done using the options available under the Format tab of the field's properties. That way, the value itself is just a number (in which case you script should work fine), and the rest it is displayed is determined by the its Format.