Trying to change text color and fill color simutaneously - Help Please!
Hello Friends,
I am trying to write a script that will change a fill color based on a calculated field's event value, but I am having trouble getting the effected field to change both colors. This is the script I currently have that will not work;
if (Number(event.value)>1)
app.alert("Total Beneficiary Allocation exceeds 100%");
if(event.value == 0)
event.target.fillColor = color.white;
else if(event.value < 1)
event.target.fillColor = color.yellow;
else if(event.value > 1)
event.target.fillColor = color.red && event.target.textColor = color.white;
else
event.target.fillColor = color.green;
The script works perfectly fine when I remove "&& event.target.textColor = color.white", but gives me "invalid assignment" when entered. All help would be greatly appreciated!
Thank you,
Eric
