Display the Method for the Lowest PDF Form Score in Adobe Acrobat
Question details
Display the method associated with the lowest of several calculated values in a PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF form calculates ranking scores for multiple methods and needs to show the method with the lowest score.
- Observed behavior
- The result field should display the method name associated with the lowest calculated ranking score.
Open the form in Adobe Acrobat and make sure the ranking fields return numeric values. Identify or create a text field where the selected method will appear.
Use an Acrobat calculation script to display the lowest-score method
Group the score fields, store each method name in its tooltip, and calculate the result from the lowest score.
In Acrobat, open All tools > Prepare a form. Open each score field's Properties and name the fields with a shared prefix, such as RankingScore.total1, RankingScore.total2, and RankingScore.total3.
In each score field's Properties, open the General tab and enter its corresponding method name in Tooltip.
Open the result text field's Properties, select the Calculate tab, and choose Custom calculation script. Click Edit and enter: var min = null; this.getField("RankingScore").getArray().forEach(function (f) { if (min === null || Number(f.value) < Number(min.value)) min = f; }); event.value = min ? min.userName : "";
In Prepare a form, use Set field calculation order to place the score calculations before the result field. Enter test values in the form and verify that the result displays the tooltip for the lowest score.

Use WPS Office for Everyday Document and PDF Work
WPS Office is a free, lightweight alternative for everyday office work, with a familiar interface and support for common Microsoft Office formats to ease migration. Use Adobe Acrobat to create and test the JavaScript calculation described above.

Frequently Asked Questions
Where do I enter the method name for each score?
In Acrobat's Prepare a form tool, open each score field's Properties and enter the method name in the Tooltip box on the General tab. The script reads that tooltip through the field's userName property.
What happens if two methods have the same lowest score?
The example displays the first minimum it encounters because it replaces the selected field only when a strictly lower value is found. Add tie-handling logic to display all tied methods or apply a preferred tie-breaker.
Why does an empty score appear to be the lowest?
JavaScript converts an empty string to zero when Number() is used. Populate every score field with a valid number or modify the calculation script to skip blank fields.
Why does the result show an outdated method?
The result may be calculated before the score fields. In Prepare a form, open Set field calculation order and move the result field after the calculated score fields.




