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

Posted on 2009-12-31
Last Modified: 2012-08-14
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.
Question by:htiaz

    Author Comment

    This is the current draft form.
    LVL 32

    Expert Comment


    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.


    Accepted Solution

    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)
    LVL 32

    Expert Comment

    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.


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
    When the confidentiality and security of your data is a must, trust the highly encrypted cloud fax portfolio used by 12 million businesses worldwide, including nearly half of the Fortune 500.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now