Expand my Community achievements bar.

Help with excluding certain feilds from a calculation

Avatar

Former Community Member
Accidentally posted in wrong place on the Acrobat scripting forum. Reposting here.



I need a bit of a shove in the right direction. New to scripting.

Adobe acrobat Pro 7.05 on XP pro system with 1 gig of ram.



I searched the scripting forum and probably didn't search using the correct key words. I could not find anything that might help.



I have an order form for clients for 55 different products. 2 price ranges. Normal price and 10+ piece discount price. The 10+ piece price does not extend to 8 of the 55 products.



I am using Life-cycle designer for this form



My form is similar to this:

--------------------------------

"Qty"(input) "Product_description" "Price1" "Price2" "subtotal"(Calculated)



"product_count"(calculated total # of items qualifying for discount)

"total_product_count" (calculated total # of items)

"Total" (Calculated)

--------------------------------



I need a way to exclude the 10 of the 55 products from the 10+ piece price in the "product_count" calc. a simple "sum(Qty[*]) works fine to tally all the products ordered.



Can someone point me to an example how to exclude items from the counting process? E.G. I have "Qty0" - "Qty55". I need "Qty11", "Qty12", "Qty23", etc... to be excluded.



I also need a way for the outcome of the product count (10 or more "qualifying products") to affect which price to use (price1 or price2)

in the "total" output box.



I assume I need an

IF "product_count => 10 THEN "price"="price2"

Else "price"="Price1"



Then I would need to transfer "price" somehow to the "Total" output box.



I learn well by example. I don't use acrobat that often. TIA for any help offered.

Chadman
0 Replies