i have 3 fields that need to subtract.
i tried this script. it works well, but i want "balance" field to display a value even if the value comes out ZERO.
AND the default value of balance field should be the blank. That means if there is no inputs(blank) in those three fields, 'balance' field should be the blank or hidden.
thank you!
var j = this.getField("TCA");
var i = this.getField("PPA");
var l = this.getField("SUMMARY");
event.value = j.value - i.value - l.value ;
var v = this.getField("balance");
var theValue = v.value;
if (isNaN(theValue) || (theValue < 0.005)){
v.display = display.hidden;
}
else{
v.display = display.visible;
}
Are any of the input fields the result of a calculation?
What are the formats of all of the fields for this calculation?
What action do you want taken if the result is negative?
I prefer not to use single letter variables because it makes the scripts hard to read and some of the system functions use single letter variables that could be confused with user single letter variables.
A possible solution:
George Kaiser