Expand my Community achievements bar.

How do I get a value attached to a text on a dropdown list?

Avatar

Level 1

I need to get an overall average based on the selected option in several different dropdown lists. Once I have the average the final field will reflect the text as one of the options. 

There are 3 areas that are being measured. 

Quantity, Quality and Performance

Each area will get a rating, The dropdown list will show Fails, Meets, Exceeds.

The ratings need a number value that can be used to average the areas. 

Quantity = Meets = 2

Quality = Exceeds = 3

Performance = Meets = 2

Total = 5

Avg = 2  (rounded to nearest whole)

Final rating = Meets

I have built the drop down lists. I see a value that appears to be attached but I cannot figure out how to grab the value.  I need to present this to the executive team soon. Please help me understand how this works, and yes I got it to work in Acrobat but needed other functionality only available in LC Designer. 

I am using Adobe LiveCycle Designer ES2.

Thank you!!

6 Replies

Avatar

Level 10

If you have assigned values to the dropdown items - on the Binding tab of the Object palette: "Specify Item Values" - those values become the rawValue for the dropdown.

So for something simple in FormCalc, on the calculate event of the Final Rating you would just add the fields together and do the math.

$ = (ddl1 + ddl2 + ddl3) / 3

Avatar

Level 1

Thank you I was making it more difficult than necessary. I thought I had to create a field to reflect the value then average them. It worked like a charm.

Avatar

Level 1

I spoke too soon. The adding is working fine but the averaging is not. It gives me the sum result. Acts as if the “ /3” (without the quotes of course) is not at the end of the formula.

Avatar

Level 10

Odd, it should work fine.

Is there anything else going on?

Avatar

Level 1

Just wanted to let you know I was able to use your suggestion. I forgot to include the parenthesis around the sum before dividing. I am very excited, my form is functioning as is should. I hope that I don’t mess up the distribution process.

Thank you.

Jerri

Avatar

Level 10

Great! Yeah got to remember your order of operations (BODMAS/PEMDAS).