Mar 21, 2019 05:09 AM
Is there a way to conditionally format text ? I have metrics that I want to report on, each has a field that show the status “Good” “Warn” “Poor” … it would be great to color the field on the report based on this.
Related but now … How do I get a chart in the page layout? Its a count of the states of the projects … 3 closed, 4 planning, 2 build, etc …
Mar 21, 2019 07:58 AM
Conditional coloring of individual field values isn’t possible, but a common workaround is to use colored emojis supplementing the text. For example:
:white_check_mark: Good
:warning: Warn
:stop_sign: Poor
…or drop the text entirely…
:white_check_mark:
:warning:
:stop_sign:
I’ll let someone else address the chart issue, as I’m on the free account and don’t have access to blocks.
Mar 21, 2019 09:02 AM
Thanks that worked. I had issues with scaling items from a pic list, so I didn’t try this … the scale with the font size should someone else care later.
Mar 21, 2019 12:56 PM
You can fake conditional formatting in Page Designer through the use of layers: To do so, you define a formula field for each possible status and then ‘stack’ them, with the color of each individual field configured appropriately. For instance, if your [actual] status field is called {Status}
, and it has the possible values of 'Good'
, 'Warn'
, and 'Poor'
, your first conditional status field would be {GoodStatus}
, with the formula IF({Status}='Good',{Status})
. Your other two conditional fields would be configured similarly.
Finally, {GoodStatus}
, {WarnStatus}
, and {PoorStatus}
would be set to the same dimensions and have the same X/Y origin — but {GoodStatus}
would have a green text color, while {WarnStatus}
's would be yellow and {PoorStatus}
's red. Since two of the three conditional status fields in a record would be empty, only the valid, color-coded status is visible. To display the status of multiple records, you’d concatenate all instances of each conditional status fields into a single field, using the newline character ('\n'
) as separator, and then layer the concatenated fields, colored appropriately. The process is both easier and more annoyingly time-consuming than it sounds — but with it one can do some pretty amazing things.
I’ve published several example bases demonstrating this technique. Probably the best introduction is item 5 from this reply; it includes a couple of sample Page Designer images, along with links to the bases used to generate them.
Mar 25, 2019 06:42 AM
Thanks! I’ll keep this in mind as I chew on this … my team is just starting to dig in and see what we want to do.