How do I create an Average calculation field in Adobe Acrobat 9 Pro?

I have an Employee Performance Review form with 11 Performance factors that can be assigned a rating of Exceeds Expectations - 4, Met Expectations - 3, Improvement Needed - 2, Failed to Meet Expectations - 1, and Not Applicable - 0. After making the appropriate selections through dropdown lists, I want to have an Overall Rating score in another field based on the average of the previous selections. Thank-you for any help anyone can offer.
Who is Participating?
htiazAuthor Commented:
I guess captainreiss is unaware that in LiveCycle Designer you can set values to dropdown list items thru Binding and at the same time preclude certain values from skewing your average calculation, as Avg ignores Null values. So if you set an evaluation item such as Knowledge below to Not Applicable and Not Applicable receives a Null value, Avg calculations will be accurate as this particular evaluation item would be left out of the Avg calculation by default.:

 form1.#subform[0].OverallRating::enter - (FormCalc, client)
OverallRating = Round(Avg(Knowledge,Quality,Productivity,Initiative,Coop,ProbSolve,PlanOrg,Comm,Adapt,Safety,Attendance),2)
htiazAuthor Commented:
This is the current draft form.

After looking at  your form I think that you have 2 issues:

Your grading description is part of the field, thus the numbers are no longer integers but are part of a text string. This means you cannot perform calculations on them. It would be better to describe the grading in the form or somewhere in the column header and have the field as numerical values only. This way you can add them all up and divide by the number of fields.

This brings me to the second issue, you have "n/a" in your options, this means you cannot have a simple divide rule as I am sure it would be unfair to apply a numerical grade and include this field in the division, as either you grade at 0 and then the appraisee feels unfairly graded as it drags the score down or if you use the average, someone else may complain as it could make the average artificially look better.

I guess your answer is in some crafty scripting,  which unfortunately is not my cup of tea at all. I suppose it will need to provide for hidden fields which count the fields having a value greater than 0 (>0, as you will need '0' for n/a to add up correctly) and then use this count as a divider rather than the fixed number of fields in the form.

So now an appraisee fills out the form and a total field calculates the sum of all score fields, the counter counts only the 'applicable' fields and you then calculate the average by dividing the former by the latter. You will also need to have  to have a selft check on the counter so you don't get a div/0 error.

I am afraid that I cannot help you with the code, but someone may drop by to add this for you. once you got it you set the field calculation on the appropriate tab in the field properties under 'Custom script'.

Field visibility is set there too.

I am not likely to disagree on your solution, but as this is the first time you mentioned LifeCycle, I did not take this into consideration. I figured that if you state Acrobat Pro as your application than this is what you have used so I rendered my advice accordingly.

If you find your own solution this is fine too as there are ways to close the question to accept your own answer.

The answer is valid to your question, but you should have probably asked the question differently to make it clear that LifeCycle is indeed what you are using.

I think the PAQ should go to asker as he solved this himself.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.