About color-coding in reports

You can set the background color of a row in a table report or a calendar event. You can set colors based on any data that exists within the table. For example, you could color-code tasks based on the value in the Priority field of your Tasks table. Make high priority tasks red, medium priority tasks yellow and leave low priority entries white.

To color-code events or table report rows, enter a formula in the report builder. You can specify color using a name (for example, "red" or "blue) or a hexadecimal value (for example, #0033CC).

To color-code rows or events:
  1. Create a new table or calendar report or edit an existing one.

  2. In the Color-coding section of the Report Builder, turn on the Color-code rows using a formula or Color-code events using a formula checkbox.

  3. In the Formula box that appears, enter a formula.

  4. The formula tells Quick Base which rows to color. Most of the time you'll use the If() function to set your conditions. (List of HTML color names.)

    For example, if you want to color all high priority items red. To do so, you'd enter the following formula:

    If ([Priority] = "High", "red", "")

    If you'd like to set a number of conditions on the same field, use the case() function as illustrated in the last two examples at the end of this topic. Find other scenarios in the table of examples below.

  5. To test your formula and see what your report looks like, click Display.

    If you need to make changes to your formula, click the Customize button above the report to return to the Report Builder and edit the formula.

  6. Click Save.

Formula Examples

You want to...

Formula

Explanation

Highlight overdue tasks in red.

If ([Due Date]<Today(), "red")

If the value in the Due Date field is less than (e.g. earlier than) today, then color the row red, otherwise, don't color it.

Color rows or events based on a combination of priority and status.

If(
[priority]="High" and [status]="Open",
"red",
[priority]="Low" and [status]="In-Progress",
"green",
"yellow")

If the value in the Priority field is "high" and the value in the Status field is "open," then color the row red. If the value in the Priority field is "low" and the value in the Status field is "In-Progress" then color the row green. If none of these are true, color the row yellow.

Color rows or events based on the user assigned to complete a task.

If([Assigned To]=ToUser("baker@example.com"), "pink", "")

Take the email address baker@example.com and convert it to the user value connected with that email account (you can use a user name instead of an email address). If the value in the Assigned To field is that user, then color the row pink, otherwise, don't color it.

Tip: Don't forget to enclose the email address or user name in double quotation marks!

Color each row or event differently, based on the status of each task.

case([Status], "Not Started", "#FFCC99",
"Started", "#99FFFF",
"In Progress", "#FFFFCC",
"On Hold", "#9999CC",
"Completed", "#99FF99", "")

Note: This formula doesn't use the If() function. Because you want to set multiple conditions on one field, it's more efficient to use the case() function. (Read more.)

If the value in the Status field is "Not Started," then color the row a shade of orange (#FFCC99).
If the value in the Status field is "Started," then color the row a shade of blue (#99FFFF).
If the value in the Status field is "In Progress," then color the row a shade of yellow (#FFFFCC).
If the value in the Status field is "On Hold," then color the row a shade of purple (#9999CC).
If the value in the Status field is "Completed," then color the row a shade of green (#99FF99)

If the value in the Status field is none of these, don't color it.

Color each row differently, based on a range of number values in a specific field.

Case(true,
[duration]<=5,"pink",
[duration]<=8,"red",
[duration]<=12,"green",
[duration]<=16,"blue","")

If it's true that the value in the duration field is:

-Less than or equal to 5, then color the row pink.
-Less than or equal to 8, then color the row red.
-Less than or equal to 12, then color the row green.
-Less than or equal to 16, then color the row blue.

Related Topics:

 

Go back      |       |   

© 1999-2018  QuickBase, Inc.  All rights reserved.  Legal Notices.