How to highlight single field in a table

Hi guys, 

I want to highlight the min value in one column of a table record.

Let´s say I have a table with goods and prices for 500g 1,000kg 2,000kg and so on. The table shows the price of several suppliers. How can I highlight the minimum price per weight (CSS background green or something). 


Thanks 

Tobias 

Solution

BigSlikTobi wrote:

Hi guys, 

I want to highlight the min value in one column of a table record.

Let´s say I have a table with goods and prices for 500g 1,000kg 2,000kg and so on. The table shows the price of several suppliers. How can I highlight the minimum price per weight (CSS background green or something). 


Thanks 

Tobias 


Hi, 

First thing is on the data, you have to make it possible for the ui to know if the field is the minimum value and then aplly css class if it is. 

An example could be returning a calclulated  boolean value from the agregate itself with this information. 

Another possibilty is to have a function that receives the value and returns a boolean. This option will require more interactions with the server/database which is worse in my opinions. 

I bet there are more options but I hope you can manage with these :) 

Solution

Hi BigSlikTobi,


I have created sample oml for you.

hope this code or logic will help you.


Regards

Rahul Sahu

BigSlikTobi wrote:

Hi guys, 

I want to highlight the min value in one column of a table record.

Let´s say I have a table with goods and prices for 500g 1,000kg 2,000kg and so on. The table shows the price of several suppliers. How can I highlight the minimum price per weight (CSS background green or something). 


Thanks 

Tobias 


Order by Price Asc and apply conditional css

Hi Guys, 

just to follow up. 

I am not 100% sure about Petros solution but it gave me the hint to do the following. 

I created a second aggregate which filtered the minimum of the values I need. Then I used cond. formating with the condition, if(value aggregate a = calculated min of aggregate b , "anyColor" , ""). 

I guess this is not the leanest solution but it helps me out. 

Best 

Tobias