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

How can this be done??

josegarcia_66
Registered: Aug 5 2009
Posts: 4

Hi,

I have a form that is set up in the following way:

(combo box with item description) - (textField w/ description code) - (numericField)

Now the user does this:

1.Chooses an item description from the combo box, as soon as the choice is made, the description abbreviated code is filled in the textField, and the numericField becomes "visible" so that the user can input a dollar amount.

2.I have about 50 rows setup in this manner, when the user inputs the information for each row, the numericField for each row gets added using the "Sum()" method of FormCalc, and the total gets stored in a totalNumericField.

My question is... How can I go about so that I can add all the amounts in the numericField based on the Item description that the user chose?

for example... if in row 1 the user chooses item 1 and input $10.00, and then in row2 he chooses item 2 and inputs $20.00, and does this for many rows, but in no specific order, meaning he can choose any item many times, how can i get the total for item 1, and item 2, and so on?

thanks for your help.

jonom
Registered: Jan 31 2008
Posts: 133
If you're using a table and have let the table number the additional rows for you - e.g. Row1[0], Row1[1], etc. - you can use wildcards with FormCalc and do something like this:
sum(Table.Row[*].numericField[*])

If you search in the help under "calculating" there are some other examples of using JavaScript to loop through fields.