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
Guru Vemuru 1Guru Vemuru 1 

Formula for insert Image?

Hi every one,

I written one formula for displaying images for different condition.

IF( Total_Lead_Score__c<20, IMAGE('/resource/1502342615000/Star1', 'Star1'),
IF( Total_Lead_Score__c<40, IMAGE('/resource/1502342589000/Star2', 'Star2'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502342560000/Star3', 'Star3'),
IF( Total_Lead_Score__c<60, IMAGE('/resource/1502311560000/Star3', 'Star4'),

This produces a Compiled formula too big error

CASE( Total_Lead_Score__c ,

Error: Incorrect number of parameters for function 'IMAGE()'. Expected 2, received 1
Hi Guru,

The error is due to the missing required 2nd parameter for the IMAGE function. Please try using the below formula and let me know if this works for you.

Guru Vemuru 1Guru Vemuru 1
Hi STarique14,
I written same formula but it saying like:

Error: Compiled formula is too big to execute (8,726 characters). Maximum size is 5,000 characters

That why i am using CASE please help me with that.
In Case example, use IMAGE("/resource/1502342560000/Star5"," ")  instead of IMAGE("/resource/1502342560000/Star5") and see if this works for you,
I am not getting the compilation error when i am storing the same formulae in my org.
Guru Vemuru 1Guru Vemuru 1
I Tried that way it showing error. Error: Incorrect argument type for function 'CASE()'.
CASE( Total_Lead_Score__c ,
Total_Lead_Score__c<20,IMAGE("/resource/1502342615000/Star1"," "),
Total_Lead_Score__c<40,IMAGE("/resource/1502342589000/Star2"," "),
Total_Lead_Score__c<60,IMAGE("/resource/1502342560000/Star3"," "),
Total_Lead_Score__c<70,IMAGE("/resource/1502342536000/Star4"," "),
IMAGE("/resource/1502342499000/Star5", " ")
With case you cannot compare values like Total_Lead_Score__c<20 in the Case function. Error: Incorrect argument type for function 'CASE()' is due the usage of Total_Lead_Score__c<20