Skip to main content
neishee
Participant
Jul 22, 2019 5:48 PM UTC
Question

Copy Value of field by dropdown result.

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";

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

try67
Community Expert
Community Expert
Jul 22, 2019 8:45 PM UTC

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.

Translate