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

Validate and Calculate or use If statement for conditional calc field

promom
Registered: Mar 6 2007
Posts: 2

I just found this "ask expert"! COOL!
I have a real simple quickie but after 3 days, it's driving me CRAZY!
I hope you can help.
First, it's a legal worksheet calculation form with conditional calculations. First, here are the court instructions for my problem fields so you can understand what I'm trying to do:
 
13. Line 9. Equalizing spendable income. If "net spendable income" on Line 8, Column 3, is a positive number, divide "combined net spendable income" by two and enter the result in each column of Line 9.
 
14. Line 10. Amount transferred and received. The party with the larger net spendable income will transfer an equalizing amount to the party with the smaller net spendable income. To determine the amount of the transfer or receipt, subtract Line 9 (one-half of combined net spendable income) from Line 8, "net spendable income" and enter the amount on Line 10. This is the amount to be transferred by the party with the larger net spendable income to the party with the lower net spendable income.
For example, if the husband has a net spendable income of $1,000.00 per month and the wife has a net spendable income of $500.00 per month, divide the total, $1,500.00, by two. Since the husband has the larger net spendable income, enter the result, $750.00, on Line 9, under Column 1. To determine the amount the husband transfers, subtract Line 9 of Column 1 from Line 8 of Column 1 ($1,000.00 minus $750.00 = $250.00) and this amount ($250.00) will be transferred each month by the husband to the wife.
---------
 
I think I got everything working fine except when it comes to **** Line 10 *****- what I need to happen is:
determine if husband has more than wife and *if* TRUE then calculate the field by subtracting a prior field's result from another prior field's calculated results.
I tried validating first (but then realized I don't understand how to do that or what it's for exactly; sooooo I decided to try to combine on the custom calculation script.
 
Please help:
I need the logical operations first and then calculations based on whether tit's true or false.
Here's the last thing I tried(on item number 10):
 
if (HSpendableI > WSpendableI) then
HSpendableI-HHalfSpend;

endif
  
I hope this explains how I need help! I think I asked Ted but in the wrong forum. Sorry! (I can send the file if that will help)

My Product Information:
Acrobat Pro 6.0.4, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
See my offline answer to this question.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.