Returning different value if field is "0" to when it is empty
Hi all!
I'm trying to create a script in Adobe Forms where variable in an adjacent field will return different values in the target field. I would like the returning value to stay empty if the adjacent field is empty [if (v = empty) event.value = ""]. I've attempted to read through other answers, but haven't been successful in applying to this scenario.
var v = Number(this.getField("ATPRow1").value);
if (v >= 0.01 && v <= 14.99) event.value = 2.75;
if (v >= 15 && v <= 74.99) event.value = 3.85;
if (v >= 75) event.value = 5.06;
if (v == 0) event.value = 0.88;
Can anyone help? Thanks in advance!
