If someone could please help me with the code and how to implement it. I have a list with status field in it. I would like to color code the status based on choice that was made.
the field name is status
the options are - submitted (color to be red), received (orange), inprogress (yellow), resolved (green)
i believe i need to go to the list and advanced formatting, but that's all i know at this point.
any help would be greatly appreciated!!!
Thank you
Solved! Go to Solution.
Simple enough, you just need a quick decode to convert your statuses into colors.
var bg = Decode($datapoint.status,
'submitted', 'red',
'received', 'orange',
'inprogress', 'yellow',
'resolved', 'green',
'')
return {
backgroundColor: bg
}
Simple enough, you just need a quick decode to convert your statuses into colors.
var bg = Decode($datapoint.status,
'submitted', 'red',
'received', 'orange',
'inprogress', 'yellow',
'resolved', 'green',
'')
return {
backgroundColor: bg
}
You can see in my expression that I actually gave you the return statement, too. If all you want to change is the background color, you don't need anything else.
Gotcha!!!! that works too... i was just looking to change the word color, but this is more dynamic!!! thank you very much!!!