So, here is what I have...It accepts it, but nothing happens.
(function(){
var v = +event.value;
if (v<16){
event.target.fillColor=color.green;
}
if (16<v>27){
event.target.fillColor=color.yellow;
}
//Value is greater than 26
event.target.fillColor=color.red;
})();
The correct code could be:
(function() {
var v = +event.value;
if (v < 16) {
event.target.fillColor = color.green;
return;
}
if (v < 27) {
event.target.fillColor = color.yellow;
return;
}
// Value is greater than 27
event.target.fillColor = color.red;
})();
This line of code in particular isn't valid:
if (16<v>27){
Something like this would be:
if (v >= 16 && v < 27) {
which translated to English is: If the value of the variable v is greater than or equal to 16 and less than 27...
So another functionally equivalent script could be:
var v = +event.value;
if (v < 16) {
event.target.fillColor = color.green;
} else if (v >= 16 && v < 27) {
event.target.fillColor = color.yellow;
} else { // Value is greater than or equal to 27
event.target.fillColor = color.red;
}
I'm not sure if it's exactly what you want, but you should be able to revise it to suit.