Forum Discussion

JenLatkowski's avatar
JenLatkowski
Qrew Member
7 years ago

Formula-Text with multiple results in various color

I have a list field called Status which I am using to display a message (in color) at the top of a page. 

My formula looks to Status field and when a status of "x" is found it displays "y" (an example is below).

I want to change the font size and color on the "y" value.

For example; when the Status is O-Pending, I want "Not Started" to be displayed on my form in Red and have a font size of 140% the normal font size. 

I am fairly new to this and would appreciate any help that can be provided!


If(
[Status]="O-Pending","Not Started",
[Status]="O-Assigned","Open",
[Status]="O-HOLD", "On Hold",
[Status]="C-Closed-Request Complete", "Closed")
  • Check out Kirk Trachy's Magic Buttons app on the Exchange. More formatting options than you can shake a year's worth of sticks at, with practical examples.
  • Jen,

    I would create another table called "Status".  In that table you can have at least two fields.  One is the status itself, the other is the formatted text that you want to display for that status.  Make the second a Rich Text field.  This way you can format it anyway you want. 

    Relate the Status Table to the table you are working in (Status is the parent table). Replace your formula field in your question with a lookup of the Rich Text field from your status table.  

    With this solution you won't have to worry about figuring out the html and css required to format your text and you won't need to update your formula every time someone decides to change the wording of the statuses.

    Hope this helps.
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      I used that solution myself with a "low code" client.

      Note that you need to set the Key field of the Status choices table to be the Status words.