Skip to main content
Participant
January 16, 2025
解決済み

How do I make a form with a formula so that two numbers from other forms can be multiplied and then

  • January 16, 2025
  • 返信数 1.
  • 630 ビュー

How do I make a form with a formula so that two numbers from other forms can be multiplied and then divided by the next number? For example, 40000*5%:105?

解決に役立った回答 Nesa Nurani

Use this as custom calculation script of "Field4":

var f1 = Number(this.getField("Field1").valueAsString);
var f2 = Number(this.getField("Field2").valueAsString);
var f3 = Number(this.getField("Field3").valueAsString);

if(f3 != 0)
 event.value = f1*f2/f3;
else
 event.value = 0;

Replace "Field1", "Field2", "Field3" with your actual field names.

返信数 1

Nesa Nurani
Community Expert
Community Expert
January 16, 2025

You mean you have two fields where you input values, and you want to use calculation to show the result in the 3rd field?
What do you mean by 'next number', can you describe exactly what you want and include field names?

????_5915作成者
Participant
January 16, 2025
I want to multiply field 1 by field 2 and divide field 3. The result should be in field 4.

Nesa Nurani
Community Expert
Nesa NuraniCommunity Expert解決!
Community Expert
January 16, 2025

Use this as custom calculation script of "Field4":

var f1 = Number(this.getField("Field1").valueAsString);
var f2 = Number(this.getField("Field2").valueAsString);
var f3 = Number(this.getField("Field3").valueAsString);

if(f3 != 0)
 event.value = f1*f2/f3;
else
 event.value = 0;

Replace "Field1", "Field2", "Field3" with your actual field names.