PDF Editing Issues

Adobe Acrobat: Leave a Calculated Form Field Blank When Scores Are Zero

Natalie TaylorNatalie Taylor Nov 19, 2026 869 views

Question details

Make the SuggestedMethod field stay blank until at least one ranking score is greater than zero, then display the tooltip of the lowest positive score.

Leave an Acrobat Calculated Field Blank When All Scores Are Zero
Product
Adobe Acrobat PDF forms
Device & OS
not provided
Scenario
A PDF form uses JavaScript to compare a group of RankingScore fields and display the corresponding field tooltip.
Observed behavior
When all ranking scores initially contain zero, SuggestedMethod displays the first column's tooltip instead of remaining blank.
Before you start

Open the PDF in Adobe Acrobat and confirm that the score fields are grouped under RankingScore and the output field is named SuggestedMethod. Check that the score fields have tooltips, because the calculation displays the selected field's tooltip.

Solution 1Recommended

Ignore zero scores in the SuggestedMethod calculation

Use a custom calculation script to select the lowest positive score and leave the output blank when no positive score exists.

1
Open the form editor

In Adobe Acrobat, open the PDF and select All tools > Prepare a form.

2
Edit the output field

Double-click the SuggestedMethod field to open its properties. On the Calculate tab, select Custom calculation script and click Edit.

3
Replace the calculation script

In the JavaScript editor, replace the existing calculation with: var oMinFld = null; this.getField("RankingScore").getArray().forEach(function(oFld) { if (oFld.value > 0 && (!oMinFld || oFld.value < oMinFld.value)) { oMinFld = oFld; } }); event.value = oMinFld ? oMinFld.userName : "";

4
Save and test the form

Close the script editor and field properties, save the PDF, and test the form. With every score set to zero, SuggestedMethod should be blank; enter positive scores to check that it shows the tooltip of the lowest one.

Ignore zero scores in the SuggestedMethod calculation
How the selection works: The script ignores zero and negative values. If multiple fields share the lowest positive score, it keeps the first matching field in the array.
Free Microsoft Office alternative

Work with PDF and Office files in WPS Office

WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and support for PDF and Microsoft Office formats to make migration easier. Use Adobe Acrobat for the custom form calculation described above; WPS Office does not fix Acrobat JavaScript.

Open and review PDF documents alongside other filesWork with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday document tasksAccess a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does SuggestedMethod show a value when every score is zero?

The original calculation can select the first field as the minimum even when its value is zero. Add the oFld.value > 0 condition in SuggestedMethod's custom calculation script to exclude zero scores.

Where does the displayed tooltip come from?

The script reads oMinFld.userName, which is the selected field's tooltip. In Prepare a form, open a RankingScore field's properties and check its Tooltip setting.

What happens if two fields have the same lowest positive score?

The script keeps the first matching field returned by the RankingScore array because it replaces the current minimum only when it finds a strictly lower value.

Why might SuggestedMethod not update after a score changes?

In Acrobat preferences, check that automatic form-field calculation is enabled. Also check the field calculation order so the RankingScore fields calculate before SuggestedMethod.