• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jan 15, 2025 Jan 15, 2025

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?

TOPICS
How to

Views

198

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jan 16, 2025 Jan 16, 2025

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.

View solution in original post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2025 Jan 15, 2025

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2025 Jan 16, 2025

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.

Screenshot_3.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2025 Jan 16, 2025

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2025 Jan 16, 2025

Copy link to clipboard

Copied

LATEST

Thank you very much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines