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";
Copy link to clipboard
Copied
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.