Answered
How can I change the font color in a combo box based on the selection made? If Yes is selected in the combo box, I want the text color to turn to dark blue and the fill color to turn to pale blue. Below is the code I tried to use, but it is not working. No matter what I pick in the combo box, the text stays black.
if (event.willCommit) { getField("UnitDown").textColor = (event.value === "Yes")
? this.textColor = [color.blue]:
this.textColor = [color.black]; }
Any assistance you can provide would be greatly appreciated.
Added "this." before the getField().
Removed [] square brackets surrounding colour arrays.
Also, since you're setting a variable with a ternary outcome, it's best not to try to set something else as the variable value.