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

Calculating with fixed value in form

Contributor ,
Feb 13, 2019 Feb 13, 2019

I know how I can add different fields.
But now I want to multiply a fixed value with a field.
I have one field and want to multiply that value with 0,29
I tried it with the option Javascript and than:

Field1*0,29

But that doesn't work.

How can I give in this calculation?

TOPICS
PDF forms
3.2K
Translate
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 ,
Feb 13, 2019 Feb 13, 2019

Use simplified field notation:

Field1 * 0.29

Translate
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 ,
Feb 13, 2019 Feb 13, 2019

If you want to use JS use this code:

event.value = Number(this.getField("Field1").valueAsString) * 0.29;

Translate
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
Contributor ,
Feb 13, 2019 Feb 13, 2019

Yeh, that one works, tnx!!!!

Translate
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 ,
Mar 20, 2019 Mar 20, 2019

This was helpful for mine. But can you help me with an additional step? I am trying to find the gross premium by a multiplier of commission. If there is no commission, and I put 0 zero into the field, I need the gross premium to auto populate with the net premium. Do you know the code I would put in after the one you stated above to make it auto populate?

Translate
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 ,
Mar 20, 2019 Mar 20, 2019
LATEST

Create a new discussion for this.

Translate
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