Skip to main content
cmvarga5
Known Participant
October 23, 2024
Answered

Calculating sum of multiple fields minus one or two fields in one form field

  • October 23, 2024
  • 2 replies
  • 1149 views

I cannot find a way to calculate a total of multiple fields and then subtract all in the same text form field...is there a way to do this?

eg: TOTAL ASSETS 1 + TOTAL ASSETS 2 - LIABILITIES 1 + LIABILITIES 2

 

 

This topic has been closed for replies.
Correct answer PDF Automation Station

Enter the following custom calculation script:

event.value=

this.getField("TOTAL ASSETS 1").value+

this.getField("TOTAL ASSETS 2").value-

(this.getField("LIABILITIES 1").value + this.getField("LIABILITIES 2").value);

2 replies

Nesa Nurani
Community Expert
Community Expert
October 23, 2024

If this what you want to calculate, use simplified field notations just escape space character in your field names with backslash like this:

TOTAL\ ASSETS\ 1 + TOTAL\ ASSETS\ 2 - LIABILITIES\ 1 + LIABILITIES\ 2

cmvarga5
cmvarga5Author
Known Participant
October 23, 2024

Thank you very much!

PDF Automation Station
Community Expert
Community Expert
October 23, 2024

Are those field names?

PDF Automation Station
Community Expert
Community Expert
October 23, 2024

Enter the following custom calculation script:

event.value=

this.getField("TOTAL ASSETS 1").value+

this.getField("TOTAL ASSETS 2").value-

(this.getField("LIABILITIES 1").value + this.getField("LIABILITIES 2").value);

cmvarga5
cmvarga5Author
Known Participant
October 23, 2024

Thank you so much!