Background I have 30 card amount fields, then I have a subtotal , Per Card Fee, and a Shipping Charge Field. I am trying to get the Shipping Charge field to count the number of amount fields that have an amount entered and if there are less than 25 amounts entered then the shipping charge should be “10” and if there are more than 25 I want the field blank. I also want the field blank when all of the amount fields are empty.
I was able to get the Per Card Fee if statement to work correctly. The Per Card Fee is 3.95 per card and the field should be blank if the amount fields are empty.
Here is the formula I was using for the shipping charge. I’m sure there is a better formula maybe a java script, however I do not know jave at all. PS I have not included all 30 Card Amounts
if (Count(Card_Amount_1,Card_Amount_2,Card_Amount_3,… < 25 ) then
10
else
""
endif
Here is the working per card fee formula.
if ( Count(Card_Amount_1,Card_Amount_2,Card_Amount_3,…) > 0 ) then
Count(Card_Amount_1,Card_Amount_2,Card_Amount_3,…) * 3.95
else
""
endif
Then your calculation code would be
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script