220
Views
3
Comments
Solved
Change Cell backcolor/forecolor based on values
Question
Application Type
Reactive
Platform Version
11.14.0.34358

Hi All,

Does anyone the easiest way to change a tablerecords cell back/fore colour.
But based on 2 tables.
So i have 2 data tables. Exactly the same structure. Exactly the same amount of rows
Except the values are different.
Data Table 1 is the table being displayed and contains actuals
Data Table 2 is the baseline (not fixed numbers)
I want to compare the actuals against the baseline. If its more then Colour A, if its less Colour B OR if its within a certain % then colour C.

I thought i could achieve it by looping through each data table cell and retrieve the value using the rownumber currently on, and then the column name in the structure. Then use IF statements to make the comparison. 

But then im stuck on how i would achieve setting the Back Color / Fore color of the actual cell in TableRecords itself

Am i going down the right path, or is there another method that this can be achieved?

Thanks :)


2021-06-02 20-50-04
Márcio Carvalho
Solution

I agree with @Amit Jain.

Have a look at this post, as some similarities with your question.

https://www.outsystems.com/forums/discussion/44122/how-to-change-the-color-of-specific-even-row-in-table-record-list/

Kind Regards,

Márcio

2025-08-07 06-30-56
Amit J
Champion

You can use same condition in property of cells of table for appliyng the syle with background color in 


2021-06-02 20-50-04
Márcio Carvalho
Solution

I agree with @Amit Jain.

Have a look at this post, as some similarities with your question.

https://www.outsystems.com/forums/discussion/44122/how-to-change-the-color-of-specific-even-row-in-table-record-list/

Kind Regards,

Márcio

UserImage.jpg
Brad Smith

Thank you Both. I just got it working :) using a separate tablerecords and IF statements :) 

Thank you for quick and helpful response 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.