Custom calculating script question
Hello,
I am running this custom script to figure a field, problem is they want the sum to be a percentage rounded to 4 decimal points, but when I set the field to be a number and limit it to the 4 decimal points, the field gives an error because the custom script is putting a "NaN" in the field when there are no numbers to calculate. This NaN is not a number and causes the error message that it does not comply with the allowed format of the field.
// Get first field value
var v1 = getField("DSW-Total Payments").value;
// Get second field value
var v2 = getField("DSW-Total Monthly Income").value;
// Set this field value equal to the difference
event.value = v1 / v2 * 100;
Any help would be greatly appreciated.
