Hi there, I have a value stored in the database. Depending on the whether that value falls into a given range I want to display a text AND that text to be of a given colour.
Here are the values, the text and the respective colours:
Value Text Colour
90-99 Very Severe (red)
80-89 Severe (red)
65-79 High (orange)
25-64 Medium (yellow)
5-24 Low (green)
0-5 Very Low (green)
I know I could achieve this by making a load of conditionals… but this seems ugly and inefficient. Does anyone know of a clean way to achieve this? I am wondering if there might be a way to do this with option sets?
To me, it seems ideally suited to conditionals. Their whole purpose is to conditionally alter appearance based on data and/or states.
If you’re seeking a way to easily alter the ranges without having to edit every place they appear, then you can certainly use an option set to define the ranges.