How to get the data from a summary field and populate a formula field

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • In Progress
I have summary fields that need to be color coded.  I am thinking I need to create a formula rich-text field and have the formula read for it to equal whatever value is in the other field, then create a <div> tag to add a background-color:blue tag.  I just am not sure on the equals the other value syntax.  
Photo of Casie Masters

Casie Masters

  • 292 Points 250 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Yep, you'll need a formula rich text field. You then just insert your summary field into the middle of the div as such.

"<div style=\"background-color:pink;\">"& [Priority]&"</div>"

Here are more details https://help.quickbase.com/user-assistance/color_field.html

If you need it to change dynamically based on the field value here is another example:

Case([Priority],
"Urgent", "<div style=\"color:white; background-color:#FF0000;\">[Priority]</div>", 
"High","<div style=\"background-color:#FF6666;\">[Priority]</div>", 
"Medium", "<div style=\"background-color:#FF9999;\">[Priority]</div>", 
"Low","<div style=\"background-color:#FFCCCC;\">[Priority]</div>", "")
(Edited)
Photo of Casie Masters

Casie Masters

  • 292 Points 250 badge 2x thumb
Thank You!  How do I get the formula field to get the value from the summary field to populate though?  Then I can hide the summary field and just have my report populate my colored (formula) fields. 
How did you create your summary field? Is it just in a Summary Report or is it an actual summary of child records in a relationship?

In the method I described above you would use a summary field from a relationship. Summary reports don't allow for colorization.

In my example "[Priority]" refers to the Summary field, so you'd just replace it with your summary field name.