Compare two columns

0
I want to compare Column A & B. and condition is If B >A. then B column value red color. Please guide. Thanks in advance.
asked
3 answers
1

Hi Amar , you can refer the answer posted in your other forum question 

https://community.mendix.com/link/space/studio-pro/questions/132658

Same logic you can apply here as well.

 

For example , click the column b header cell and go to appearance tab use dynamic cell section to add your custom CSS like below ,

if $currentobject/column1> $currentobject/column2

then

'color-red'

else

''

you can define the custom CSS with this class name called color-red

in your custom CSS file you can add below style 

.color-red{

background-color : red;

}

answered
0

image.png

Appearance tab looks like above image where i don't find Current object.

answered
0

Hi Amarjeet,

 

In continue of what stella answered, you have to use datagrid2 inorder to use CurrentObject variable.

 

So that you can use the attributes of that particular object.

answered