I have 29 columns in my table/app and I’m using the sc_field_color macro to change their colors based on value.
values:
1 = Yes - green
2 = No - red
3 = N/A - blue
The code below is for 1 column and I have 29! Is there some way to condense all this. I’m no programmer but if pointed in the right direction I can do it. I was thinking FOR loop? What would you all suggest?
if ({item1} == '1')
{
sc_field_color("item1", "#00CC00"); //green
}
elseif ({item1} == '2')
{
sc_field_color("item1", "#CC0000"); //red
}
elseif ({item1} == '3')
{
sc_field_color("item1", "#0000FF"); //blue
}