How Do I add Project Conditions w/colored legend to Jobs Table?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm attempting to have a PC tracker so I can sort my jobs by status/color. I attempted the following formula and received several syntax errors:



Case([Status],"Not Started", "https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"Not Started\">", "In-Progress", If([Status]is not equal to[Complete],"https://images.quickbase.com/si/16/227-rect_red.png\" title=\"Project Overdue\">",If(ToDays([Total Days Overdue])>0,"https://images.quickbase.com/si/16/229-rect_yellow.png\" title=\"Task Overdue\">","https://images.quickbase.com/si/16/228-rect_green.png\" title=\"On Time\">")), "Completed", "https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"Completed\">", "On Hold", "https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"On Hold\">", "Canceled", "https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"Canceled\">")



I'm attempting to sort PC by Job status:

ORDER  - red

Not Started -gray

WTG-Parts -gray

Need Drawing -red

Schedule -red

BID ONLY - yellow

In Progress -green

Complete -green
Photo of Naomi

Naomi

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
I am guessing this is what you want but I have not tested it and either your formula is missing the <img> tags or the forum is truncating it:

http://pastie.org/pastes/10699508/text
Photo of Naomi

Naomi

  • 0 Points
Thank you,

I attempted the new formula and received "the variable gray is not declared". I'm sure it'll say that for each color. What is the proper way to add the text color identifier link into the formula?
Photo of Naomi

Naomi

  • 0 Points
Thanks again. So I tried your new formula and adjusted the names to reflect true field names:

Case([Status],"Not Started", "<img src=\"https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"Not Started\">", "In-Progress",
If([Status]<>[Complete],"<img src=\"https://images.quickbase.com/si/16/227-rect_red.png\" title=\"Project Overdue\">",
If(ToDays([Total Days Overdue])>0,"<img src=\"https://images.quickbase.com/si/16/229-rect_yellow.png\" title=\"Task Overdue\">",
"<img src=\"https://images.quickbase.com/si/16/228-rect_green.png\" title=\"On Time\">")),
"Complete", "<img src=\"https://images.quickbase.com/si/16/228-rect_green.png\" title=\"Complete\">",
"Schedule", "<img src=\"https://images.quickbase.com/si/16/228-rect_green.png\" title=\"Schedule\">",
"On Hold", "<img src=\"https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"On Hold\">",
"Canceled", "<img src=\"https://images.quickbase.com/si/16/226-rect_gray.png\" title=\"Canceled\">")


When I tried it, I kept getting the error: "This table does not contain a field called Complete. To see available fields, click the Fields & Function dropdown to the right of the formula box."

"Complete" is a choice within my Status field..
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
This works:

http://pastie.org/pastes/10700393/text

There was a small typo in the original formula that had "vat" instead of "var" and a missing space before one of the title attributes. Also I modified your formula because you were comparing a duration to a number{

ToDays([Total Days Overdue])>0

To get the formula to work I just made the field a number and used this instead:

[Total Days Overdue] > 0