Copy link to clipboard
Copied
Hello there,
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;
Thank you
Copy link to clipboard
Copied
Then use this:
event.target.textColor = (event.value=="Please select") ? color.gray : color.black;
Copy link to clipboard
Copied
Change it to:
event.target.textColor = (event.value=="Please select") ? color.gray : color.transparent;
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Then use this:
event.target.textColor = (event.value=="Please select") ? color.gray : color.black;
Copy link to clipboard
Copied
Thank you very much,
it's working perfectly !
Copy link to clipboard
Copied
Run the script as a Custom Format Script like this:
(event.value !== "Please select") ? f.textColor = color.black : f.textColor = color.gray;
Copy link to clipboard
Copied
Hi @ls_rbls
I tested it, it's not working

