Skip to main content
Participating Frequently
May 29, 2024
Answered

Multiplication & Addition

  • May 29, 2024
  • 1 reply
  • 475 views

Hello, Everyone! I'm still learning on how to prepare a form in Acrobat. I would like to ask your help on how to get the total multiplication of the Text Field 644 and Text Field 645 and adding the total sum of the execution score in one Text Field. 

See image for reference:

Thank you!

This topic has been closed for replies.
Correct answer Nesa Nurani

As custom calculation script of "Text Field 646" use this:

var f644 = Number(this.getField("Text Field 644").valueAsString);
var f645 = Number(this.getField("Text Field 645").valueAsString);
var total = 0;
for( var i=1; i<=7; i++){
var fields = Number(this.getField("3."+i).valueAsString);
total += fields;}

event.value = (f644*f645)+total;

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
May 31, 2024

As custom calculation script of "Text Field 646" use this:

var f644 = Number(this.getField("Text Field 644").valueAsString);
var f645 = Number(this.getField("Text Field 645").valueAsString);
var total = 0;
for( var i=1; i<=7; i++){
var fields = Number(this.getField("3."+i).valueAsString);
total += fields;}

event.value = (f644*f645)+total;
Participating Frequently
June 14, 2024

Hey, Nesa. This works on my end. Thank you!