Dropdown box + fill colour dependant on choice
Hi,
I am struggling to get my dropdown box fill colour working as required.
I have a dropdown box that the user chooses a colour for a rating.
It sort of works but I would like to change the purple choice to a colour more like purple rather than the magenta I am currently using and the orange choice does not work at all.
This is my code which is in the custom calculation script box:
event.value=this.getField("Input_assurance_rating").value;
if (event.value=="Purple")
event.target.fillColor = color.magenta;
else if (event.value=="Blue")
event.target.fillColor = color.blue;
else if (event.value=="Green")
event.target.fillColor = color.green;
else if (event.value=="Yellow")
event.target.fillColor = color.yellow;
else if (event.value=="Orange")
event.target.fillColor = color.orange;
else if (event.value=="Red")
event.target.fillColor = color.red;
else
event.target.fillColor = color.transparent;
event.target.fontColor = color.transparent;
Thanks