Answered
I am working on a tax form and I need help leaving a field blank if the calculation returns a negative number.
The form has this comment
"Line 14 minus Line 18, minus Line 20, Leave blank if less than $1.00"
I am using this code which works correctly. However, I want the field to be blank if the result is less than 1
var a = this.getField("Tax Liability").value; // variable for the Line 14 Tax Liability
var b = this.getField("Total Tax Est").value; //Line 18 Total Tax Est
var c = this.getField("Credit from Spouse A").value; // Line 20 Credit from Spouse A
event.value = a - b - c; // compute Line 22 for Tax Due A
Thanks!!
var a = this.getField("Tax Liability").value; // variable for the Line 14 Tax Liability
var b = this.getField("Total Tax Est").value; //Line 18 Total Tax Est
var c = this.getField("Credit from Spouse A").value; // Line 20 Credit from Spouse A
event.value = a - b - c; // compute Line 22 for Tax Due A
if (event.value < 1) event.value = ''; // if the result is less then $1 tax liabilty then null field value
George Kaiser