Answered
I apologize if this has been answered, but I can't seem to get this calculation to work and I am brand new to Javascript-ing.
Excel formula is (value a*200000)/value b, where value a is the sum of other fields. Result is a percentage.
My Adobe Acrobat simplified field notation reads in basically the same manner:
Am I creating a divide by zero error with this simplified notation? Do I need some type of custom validation script to ensure that it will work?
Thanks in advance for the help.
eworctap
Acrobat Pro 8.0 user
// define some variables to look like Excel
var valueA = this.getField("Value A").value;
var valueB = this.getField("Value B").value;
event.value = ""; clear result field
// only perform division if divisor not equal to zero or blank
if (valueB != 0) {
event.value = (valueA * 200000) / valueB;
}
George Kaiser