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
RupB2RupB2 

Sorting custom Image Fields in List View does not work correctly

I have created a custom image field to display the time remaining from 48h to 0h until an SLA expires :

 

 

IMAGE("/img/samples/color_green.gif", "", 12, max(0, 48 - Chrono_DureeCourante__c) ) &
IMAGE("/img/samples/color_white.gif", "", 12, 1 ) &
IMAGE("/img/samples/color_red.gif", "", 12, min(48, Chrono_DureeCourante__c) ) &
IMAGE("/s.gif", "", 12, 3 ) &
text(max(0, round((48 - Chrono_DureeCourante__c), 1))) &
"h"

 

Chrono_DureeCourante__c is a number between 0 and 48.

This is what the result looks like :

 

I have tried changing the way the text is displayed (second-last line) : no good.

Is this a bug ?   Is there a way of sorting correctly ?

 

Rup

 

CloudboxCloudbox

Im not sure how to sort this correctly but I do like what you have done.

 

It looks as though it's sorting as text rather than a numerical value - as in that it is not considering the decimal place. Have you tried the stored value as a number, rather than text (or testing our some combinations to this effect)? You state that you have the value as a number, perhaps it could be a problem with the formula field that you are using for the images is "text"

 

You could try having the numerical value in another column with the text/formula/image column next to it, and then sort via the numerical value