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

Copy Value of field by dropdown result.

New Here ,
Jul 22, 2019 Jul 22, 2019

Copy link to clipboard

Copied

Hi Guys,

I am completely new to Javascript. I have managed to do a few different calculations already but am quite puzzled by this one.

The field I am trying to get the calculation for is "MortCalcC1" I have a dropdown called "Dropdown44"

If the result of dropdown44 is "Client 1" i want "MortCalac1" to copy the number in "DebtOwedDD1"

I have come up with this but it doesnt work:-

if (this.getField("Dropdown44").value=="Client 1") event.value == "DebtOwedDD1";

TOPICS
Acrobat SDK and JavaScript

Views

178

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 22, 2019 Jul 22, 2019

Copy link to clipboard

Copied

LATEST

Almost there... You accessed the value of "Dropdown44" correctly. Why didn't you use the same way to access the value of "DebtOwedDD1"?

Also, you've made a classic error of using the wrong operator. The "==" is used for comparisons (as you've correctly used it in the condition of the if-statement); The "=" operator is used to assign a value.

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