I hope you are doing well,
I am trying to change the color text of one item in a drop-down menu list to grey, (after selecting)
I used this code, but it did not work
event.target.textColor = (this.getField("best_time_to_call").valueAsString=="Please select") ? color.grey: color.transparent;
Change it to:
event.target.textColor = (event.value=="Please select") ? color.gray : color.transparent;
Be aware this will change the color of all the items in the drop-down, though. It's not possible to change the color of just one.
thank you, it has turned the color to grey, but what I really need is to turn the color back to Black if any items other than (Select please) are selected
Then use this:
event.target.textColor = (event.value=="Please select") ? color.gray : color.black;
Thank you very much,
it's working perfectly !
Run the script as a Custom Format Script like this:
(event.value !== "Please select") ? f.textColor = color.black : f.textColor = color.gray;