Answered
First-time form maker here. Is there a calculation or greater-than/less-than validation script I can write to make the TOTAL minus the LESS AMOUNT ADVANCED show up in either a REFUNDED BALANCE or ADDITIONAL REIMBURSEMENT box?
Right now, I am using the calculation of TOTAL - LESS AMOUNT ADVANCED to do the math. But the answer (regardless of whether it's positive or negative) currently defaults to my REFUNDED BALANCE box.
Here is the vertical placement of the boxes on my form:
TOTAL
LESS AMOUNT ADVANCED
REFUNDED BALANCE
ADDITIONAL REIMBURSEMENT
Thanks!
Mac
var amount = this.getField("TOTAL").value - this.getField("LESS AMOUNT ADVANCED").value;
if (amount<0) event.value = amount;
else event.value = "";
Use this code as the custom calculation script of ADDITIONAL REIMBURSEMENT:
var amount = this.getField("TOTAL").value - this.getField("LESS AMOUNT ADVANCED").value;
if (amount>0) event.value = amount;
else event.value = "";
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com