PDF Editing Issues

Show a PDF Field Value Above 5000 in Adobe Acrobat

Rana GarciaRana Garcia Nov 25, 2026 868 views

Question details

Display the value of CALC_P4H_TOTALS in another PDF form field only when it is greater than 5000.

Show a PDF Field Value Above 5000 in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form needs a calculated field that displays a source total only when it exceeds a threshold.
Observed behavior
The destination field should show the source value above 5000 and remain blank at 5000 or below.
Before you start

Open the PDF in an Acrobat version that can edit form fields, and confirm that the source field is named CALC_P4H_TOTALS and the destination field is named CALC_HTotal>5000. The script expects the source value to be a plain number without currency symbols or thousands separators.

Solution 1Recommended

Add a custom calculation script to the destination field

Use this method to display the source total only when it is greater than 5000.

1
Open the form editor

Open the PDF in Adobe Acrobat and select All tools > Prepare a form.

2
Open the destination field properties

Double-click the CALC_HTotal>5000 field to open its Properties dialog, then select the Calculate tab.

3
Enter the calculation script

Select Custom calculation script, click Edit, and enter: var v = Number(this.getField("CALC_P4H_TOTALS").valueAsString); event.value = (v > 5000) ? v : "";

4
Save and test the form

Confirm the script, close the field properties, and save the PDF. Enter or calculate source values of 5000 and 5001 to verify that the destination is blank for 5000 and shows 5001 for 5001.

Add a custom calculation script to the destination field
Check calculation order: If CALC_P4H_TOTALS is itself calculated and the destination does not update correctly, use Prepare a form's field calculation order control to place the source calculation before CALC_HTotal>5000.
Free Microsoft Office alternative

Work with PDFs and Office files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDF and Microsoft Office files. It can help you move everyday document work into one app, but use Acrobat to configure and test this custom PDF calculation script.

Open and work with PDFs alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface for an easier transition from Microsoft OfficeKeep common document tasks together in one lightweight app
microsoft office alternative - wps office

Frequently Asked Questions

What happens when the source value is exactly 5000?

The destination field stays blank because the script uses v > 5000, not v >= 5000.

How can I include 5000 in the displayed values?

In the destination field's Calculate tab, edit the custom calculation script and change v > 5000 to v >= 5000.

Why does the destination field not update after the source total changes?

Check that the source field name in the script exactly matches CALC_P4H_TOTALS. If the source is calculated, check the field calculation order in Prepare a form and calculate the source before the destination.

Can the source value include a currency symbol or thousands separator?

The script uses Number() on the source field's valueAsString, so symbols or separators may prevent conversion. Use a plain numeric source value or adapt the script to handle the source format.