39
Views
4
Comments
Solved
[OutSystems Data Grid] [OS Data Grid] Conditional format one cell based on another cell in the same row
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.54.37 (Build 63002)

Dear all,

I'd like to ask for the below topic (this question was asked before and remain unsolved):

----------------------------------------------------------------------------------------------------------------------------------------

Let's say I have two columns of numeric data, LastPeriod and ThisPeriod, with these values:

Row 1 - LastPeriod = 10, ThisPeriod = 11

Row 2 - LastPeriod = 10, ThisPeriod = 10

Row 3 - LastPeriod = 10, ThisPeriod = 9


I want to be able to do :

  • Compare the row's cell values of ThisPeriod to LastPeriod and conditionally format ThisPeriod to be Green if higher (Row 1), Yellow if equal (Row 2), and Red if lower (Row 3).


Thanks.

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hi @Cuong Tran 

I believe this is the same as described in this forum post.

Cheers,
GM

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Cuong Tran 

To have the community help you should at least provide a sample oml with what you have tried so far and be more concise on what you're having difficulties achieving.

To see the implementation and most used functionalities of Data Grid you can check the sample application available in Forge.

For this particular case, you can check the conditional format examples here to see what's possible to do on this topic.

Cheers,
GM

UserImage.jpg
Cuong Tran

Hi GM,

Thanks for your quick reply. 

  • Regarding to the sample oml, I think it is not needed since I have described the concept and what I want to achieve.
  • Regarding to the mentioned example, the conditional format is applied by comparing the selected column (e.g., "Stock" column) with a constant values (e.g., 3000 and 4000). While in my case, I'd like to compare the value of 2 cells in 2 columns with same row.

  • I realized in my question, the value of column 'LastPeriod' should not be the same, which means it can change from row to row. I'd like to attach other image for better understanding. Basically, if the Spending is larger than Approved Budget, the cell will be marked as red.

Please let me know if you need more information.

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hi @Cuong Tran 

I believe this is the same as described in this forum post.

Cheers,
GM

UserImage.jpg
Cuong Tran

Thank you very much. It worked perfectly :)

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