Skip to main content
Participating Frequently
May 29, 2024 5:44 PM UTC
Answered

Multiplication & Addition

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 is closed to new replies. Start a new post to keep the conversation going.
Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
May 31, 2024 7:01 AM UTC

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;

2 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
May 31, 2024 7:01 AM UTC

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;
Translate
Participating Frequently
Jun 14, 2024 2:39 PM UTC

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

Translate