1357
Views
7
Comments
Solved
Different Colors for Different Statuses in Table Records

Hi everyone. I am building a Projects Web App.

In my App, Projects have a Priority Status being: "High", "Medium" & "Low". So I want to set different colors for different Statuses in the Table Records like image below... High = RED, Medium = Orange & Low = Green. What should I do to implement this?

Thanks for the help.

2017-09-07 08-16-06
Thabiso
Solution

Awesome!! 

I used this code.

Thanks for the effort to help good people. Much APPRECIATED!!

If(ProjectTable.List.Current.Priority.Id = Entities.Priority.Low,"background-color: Green;",If (ProjectTable.List.Current.Priority.Id = Entities.Priority.Medium,"background-color: Orange;",If(ProjectTable.List.Current.Priority.Id = Entities.Priority.High, "background-color: Red;","")))
2025-04-23 09-24-58
oDevFagundes
Champion

Sthamza Rinkie wrote:

Please, Mark a question like SOLVED.

Awesome!! 

I used this code.

Thanks for the effort to help good people. Much APPRECIATED!!

If(ProjectTable.List.Current.Priority.Id = Entities.Priority.Low,"background-color: Green;",If (ProjectTable.List.Current.Priority.Id = Entities.Priority.Medium,"background-color: Orange;",If(ProjectTable.List.Current.Priority.Id = Entities.Priority.High, "background-color: Red;","")))



2019-05-22 11-30-09
Marcelo Ferreira

Hi Sthamza,

If you have a static entity for status one of the fields of that static can be color. This field can be a text with color hex or of type ColorId being color a static entity of silk. After that use extended properties style with color equal to the color in the entity status.

Hope this helps.

Regards,

Marcelo

2025-04-23 09-24-58
oDevFagundes
Champion

Hey man,
you have to do it. See the Image below


SyntaxEditor Code Snippet

If(Priority = "High", "color:red",
    If(Priority = "Medium", "color:orange",
         "color:Green"))


2018-06-19 09-34-03
flpmorais

On the style extended property of the element, you can put a conditional to determine if the text is going to have a custom color and which color. Just replace the "True" with the condition of your choice to check priority and the "color:red;" with the css of your choice.

You can also override the class property, but if you do it on a Table, then you will need to add the OddLine and EvenLine classes.


Hope it helps.


2025-04-23 09-24-58
oDevFagundes
Champion

See the Attachment. You have to use Extented properties;

Capture.PNG
2017-09-07 08-16-06
Thabiso
Solution

Awesome!! 

I used this code.

Thanks for the effort to help good people. Much APPRECIATED!!

If(ProjectTable.List.Current.Priority.Id = Entities.Priority.Low,"background-color: Green;",If (ProjectTable.List.Current.Priority.Id = Entities.Priority.Medium,"background-color: Orange;",If(ProjectTable.List.Current.Priority.Id = Entities.Priority.High, "background-color: Red;","")))
2025-04-23 09-24-58
oDevFagundes
Champion

Sthamza Rinkie wrote:

Please, Mark a question like SOLVED.

Awesome!! 

I used this code.

Thanks for the effort to help good people. Much APPRECIATED!!

If(ProjectTable.List.Current.Priority.Id = Entities.Priority.Low,"background-color: Green;",If (ProjectTable.List.Current.Priority.Id = Entities.Priority.Medium,"background-color: Orange;",If(ProjectTable.List.Current.Priority.Id = Entities.Priority.High, "background-color: Red;","")))



2020-01-15 14-26-00
Ricardo Henrique Silva Calheiros

Thanks for tips!

I was in almost the same need...I used this:

SyntaxEditor Code Snippet

If(GetStatusOP(OrdemProducaoTable.List.Current.StatusOP.Id).StatusOP.Label="Em andamento", "color:yellow", If(GetStatusOP(OrdemProducaoTable.List.Current.StatusOP.Id).StatusOP.Label="Em aberto", "color:green", "color:red"))
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.