Copy link to clipboard
Copied
I am trying to subtract two fields, the fields I am attempting to subtract are "totalled" fields, meaning that field's total has a calculation. I need to subtract "totalasset" from "totalliabilities" giving me the answer in my "networth" field. However, no matter what I try I cannot get the two fields to subtract. Can someone please help me? I have use the following formula in create and edit Javascripts:
//compute the difference of the estimated value less the actual value
event.value = this.getField("TOTALASSETS").value - this.getField("TOTALLIABILITIES").value;
Help please, I have spent so much time trying to figure this out and I need to complete this pdf form.
Thank you in advance,
Marie
Copy link to clipboard
Copied
You probably have a JS error you don't know about, but since this calculation does not need JavaScript, use simplified field notation.
See the example file here:
https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations/
Copy link to clipboard
Copied
BTW: the error is in the field names. There's a space. Get Rid of it and it'll all work.
Copy link to clipboard
Copied
You probably have a JS error you don't know about, but since this calculation does not need JavaScript, use simplified field notation.
See the example file here:
https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations/
Copy link to clipboard
Copied
BTW: the error is in the field names. There's a space. Get Rid of it and it'll all work.
Copy link to clipboard
Copied
Thank you so much @Thom_Parker you were a great help!
I am VERY grateful.
Best, Marie
Stay Safe. Stay Well.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more