Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
I want to multiply field 1 by field 2 and divide field 3. The result should be in field 4.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you very much!