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

if/else calc.

New Here ,
Jul 03, 2022 Jul 03, 2022

Copy link to clipboard

Copied

Hello.

Just look at my picture.

 

Im thankfull for any help 🙂

 

Bild_2022-07-04_024745638.png

TOPICS
PDF forms

Views

110

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

correct answers 1 Correct answer

Community Expert , Jul 03, 2022 Jul 03, 2022

As 'custom calculation script' of "Text37" field use this:

if(this.getField("Check Box36").valueAsString != "Off")
event.value = Number(this.getField("y").value)*.38*100;
else
event.value = 0;

Votes

Translate

Translate
Community Expert ,
Jul 03, 2022 Jul 03, 2022

Copy link to clipboard

Copied

You may need to be more specific.

 

What exactly are you trying to calculate when the checkbox is in checked state?

 

And where are you trying to run the desired script from?

 

If this is a conversion from USD to EUR,  what is "0,38"... is this the exchange rate?  And if it is a known exchange rate why is it expressed witha comma?

 

Shouldn't it be 0.38, in which case, I don't understand why the exchange rate is hardcoded into the equation since this value varies daily.

 

But like I said, please explain in more detail what field is the USD which field contains the calculation for the exchange rate, and what formula are using to convert from US dollar to Euros?

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 ,
Jul 03, 2022 Jul 03, 2022

Copy link to clipboard

Copied

LATEST

As 'custom calculation script' of "Text37" field use this:

if(this.getField("Check Box36").valueAsString != "Off")
event.value = Number(this.getField("y").value)*.38*100;
else
event.value = 0;

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