Skip to main content
Participant
May 5, 2025
Answered

Make a subtotal field blank until i add the amount field.

  • May 5, 2025
  • 1 reply
  • 297 views

I have the subtotal adding to the next row's Amount field to get a new Subtotal. But the future subtotal fields add the blank amount, and i want them to be blank until i add a nother Amount field number.

 

 

Correct answer PDF Automation Station

A condition to your subtotal calculations that either only calculations if the corresponding amount field is > 0, or hides the subtotal field unless the amount > 0:

if(this.getField("Amount.1").value>0)

{/* run calculation script*/}

OR

if(this.getField("Amount.1").value>0)

{event.target.display=display.visible}

else

{event.target.display=display.hidden}

1 reply

PDF Automation Station
Community Expert
Community Expert
May 5, 2025

A condition to your subtotal calculations that either only calculations if the corresponding amount field is > 0, or hides the subtotal field unless the amount > 0:

if(this.getField("Amount.1").value>0)

{/* run calculation script*/}

OR

if(this.getField("Amount.1").value>0)

{event.target.display=display.visible}

else

{event.target.display=display.hidden}

Participant
May 5, 2025

Thank you!