function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BryanHill10BryanHill10 

Conditional Formmating Custom Object List View

Through all my research this seems to be a hot topic but have yet to find a solution or app to implement.

In my Custom Object List View in Lightning I would like to set some conditional formatting to change the background color of field cells based on numeric value.

Simple Example

0-5% = Rede
5-8% = Yellow
8%+ = Green

My apolgies if this has been resolved. Is it has, I can't find the right answer anywhere. Thank you!
Best Answer chosen by BryanHill10
Alain CabonAlain Cabon
Ok 

3. LIST VIEWS (customization of the columns by point-and-click)

The better forum for this question is:  https://success.salesforce.com/
or  https://salesforce.stackexchange.com

 https://salesforce.stackexchange.com/questions/187615/formula-field-with-image-in-list-views-in-lightning-experience

because the administrators often know the best "tricks" and work-arounds to customize the application by point-and-click without coding.

For me, that seems difficult natively if you don't have found a solution directly yet.

When it is impossible by point-and-clicks, the programmatic way can be an option but for these essential list views, it is not very wise in my opinion for only some colors.
 

All Answers

Alain CabonAlain Cabon
 Custom Object List View : three meanings:
  1. Custom list with an <aura:iteration> like above
  2. <lightning:listView> (programmatic)
  3. LIST VIEWS (customization of the columns by point-and-click)
BryanHill10BryanHill10
Alain, thank you for your response, this is a bit over my head. I wouldn't be able to implement this without further direction. Is this code for a visual force page? Not even sure where to start at this point.
Alain CabonAlain Cabon
Bryan, you should copy/paste a snapshot of your "custom object list view" because there are several kinds of "list view".

It is also perhaps a question for this forum:   https://success.salesforce.com/
BryanHill10BryanHill10
Here is a screen shot. Basically I need the last 3 columns to change color based on the values. 

User-added image
Alain CabonAlain Cabon
Ok 

3. LIST VIEWS (customization of the columns by point-and-click)

The better forum for this question is:  https://success.salesforce.com/
or  https://salesforce.stackexchange.com

 https://salesforce.stackexchange.com/questions/187615/formula-field-with-image-in-list-views-in-lightning-experience

because the administrators often know the best "tricks" and work-arounds to customize the application by point-and-click without coding.

For me, that seems difficult natively if you don't have found a solution directly yet.

When it is impossible by point-and-clicks, the programmatic way can be an option but for these essential list views, it is not very wise in my opinion for only some colors.
 
This was selected as the best answer
Frenix Rajiah 38Frenix Rajiah 38
I managed to color code my list view based on the number of days the case was open. No Apex code was used.
I first uploaded the resized color images into the Documents object in classic and copied the Ids of the uploaded images. 
Then I created a text formula field and passed the Ids of the images into the following formula:
IF( Case_Open_Time__c < 1 , IMAGE('/servlet/servlet.FileDownload?file=0158M0000004z1j',""),
IF(Case_Open_Time__c > 1 && Case_Open_Time__c < 2 ,IMAGE('/servlet/servlet.FileDownload?file=0158M0000004z1o',""),
IF(Case_Open_Time__c > 2 && Case_Open_Time__c < 3 , IMAGE('/servlet/servlet.FileDownload?file=0158M0000004z1t',"") ,
IF(Case_Open_Time__c > 3 && Case_Open_Time__c < 4 , IMAGE('/servlet/servlet.FileDownload?file=0158M0000004z1y',""),IMAGE('/servlet/servlet.FileDownload?file=0158M0000004z1y',"")
))))
The result image looks pretty cool.
Color coded fields in List Views