Hello,
i want to create a textfield, where the sum of values from around 24 dropdown fields is displayed. Its important that i get the values (e.g. 1, 2) not the displayed text in the field.
I'm using Adobe lifeCycle Designer.
I know how to do it with Acrobat Pro, but i've chosen the Designer for my form.
Is there any function or a jscript?
Please help me.
Yours,
Michael
My Product Information:
Acrobat Pro 7 / Windows
Offline

Assuming the 24 drop down lists and the summation field (which should really be a numeric field rather than a text field) are all contained within the same subform, then all you need to do is add script to the summation field's Calculate event to add the values of the drop down fields.
If you write your script in JavaScript (make sure you specify JavaScript as the language in the Script Editor when you're editing the Calculate event), it would look like this:
drop1.rawValue + drop2.rawValue + ... + drop24.rawValue;
Notice there's no assignment. That's because the scripting engine looks for a value set by the event.
This way, whenever the user picks a new item from any of the drop down lists, the summation field's value will automatically be recalculated.
Depending on how you've setup your form, you may also be able to use FormCalc to make the summation easier. If you've given the same name to all the drop down lists, then you'll have occurrences of a drop down list (such as droplist[0], droplist[1], ..., droplist[23]). In that case, you can use the FormCalc "Sum()" function to do the work for you. In the summation field's Calculate event, you would set the language to FormCalc and use the following script:
Sum(droplist[*])
This would set the summation field's value to the sum of all occurrences of the "droplist" field.
Offline
Hi,
I did as you told me using javascript.
But with
drop1.rawValue + drop2.rawValue + ... + drop24.rawValue;
I get the Values listed!
E.G: my dropdownfields are named A, B and C
my script is "calculate": A.rawValue + B.rawValue + C.rawValue;
possible Values are 0,1,2,3
then when at A 0 is selected
at B 2
and at C 3
my textfield with the calculate event looks like: 023, theres no calculation!
What I've done wrong?
Yours,
Michael
Offline
AcrobatUsers.com >> User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in