These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Conditional using fields for comparison

papaka
Registered: Oct 7 2011
Posts: 7

I have looked at the tutorials and the conditional or if/then examples refer to comparing to a constant. I need to compare 1 field to another and determine the greater or lesser. For instance, If the total of field 1 is great than field 2 I want to show the result of field 1, if field 1 is less than field 2 then I would show 0.
 
Please advise.
 
papaka

papaka
Registered: Oct 7 2011
Posts: 7
Here's how I worked it out...

var Box106 = this.getField("T106").value;
var Box107 = this.getField("T107").value;
if (Box106 > Box107)
event.value = (Box106-Box107);
else event.value = " ";