Skip to main content
Henry.Ong
Inspiring
July 14, 2025
Question

How to solve the delay in the calculated fields?

  • July 14, 2025
  • 3 replies
  • 318 views

The attached file is part of my fillable PDF.

I am wondering why there is a delay in the computation of cell F4 and the computation of the Score.

Cell F4 should show 10, and the Score should show 100.

I don’t know if this script has something to do with this issue.

 

if(this.getField("F04001b").value)

{event.value=this.getField("F04001b").value / this.getField("F04001a").value};

 

This script is used to solve the mathematical computation of numbers by zero.

 

Can someone point out my mistake and how I can fix this problem, please? Thanks.

3 replies

try67
Community Expert
Community Expert
July 14, 2025

You also need to change your if-statement so that it checks whether the value of "F04001a" is zero (or blank), not that of "F04001b". The latter will result in zero. The former will result in Infinity (as division by zero is not allowed), which will cause an error if the field has the Number format selected.

Henry.Ong
Henry.OngAuthor
Inspiring
July 23, 2025

Can you provide the script I should put in F04001a that will solve my problem? Thanks.

Bernd Alheit
Community Expert
Community Expert
July 14, 2025

Change the field calculation order.