You need to sign in to do that
Don't have an account?
Mokshada
how to show image of ratings based on picklist using formulas.
I want to create one picklist namely rating and having values 1,2,3,4,5 and we have five images of 1 star , 2 star etc upto 5 star and wanted to create one image formula field where we will be able able to see images which we have from 1 star to 5 star.
How to acieve this?
Thanks
How to acieve this?
Thanks
There was syntax error in If() statemnets. Can you try below.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
You can upload the images in static resources and use them in formule as below.
I just tried it for Picklist with 1 if remaining vaules are selected it gives Sample as text in the formula. If 1 is selected it shows the image as shown below.
Similarly you can do multiple if statements or Case to achive it.
Please find the article (http://bestirtech.com/blog/2019/02/displaying-images-in-formula-fields-in-salesforce/) for the same.
I have used "Images from Static Resources:" in the above link.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
Try Below Formula Please Mark It As Best Answer If It Helps
Thank You!
I have written like ,
If(TEXT( Ratings__c )= '1' , IMAGE("/resource/OneStar", "ONE", 24, 24), 'SAMPLE',
If(TEXT( Ratings__c )= '2' , IMAGE("/resource/TwoStars", "TWO", 24, 24), 'SAMPLE',
If(TEXT( Ratings__c )= '3' , IMAGE("/resource/ThreeStar", "THREE", 24, 24), 'SAMPLE',
If(TEXT( Ratings__c )= '4' , IMAGE("/resource/FourStar", "FOUR", 24, 24), 'SAMPLE',
If(TEXT( Ratings__c )= '5' , IMAGE("/resource/FiveStar", "FIVE", 24, 24), 'SAMPLE')))
))
but getting error as " Error: Incorrect number of parameters for function 'If()'. Expected 3, received 4" but if I make it three then it is showing one pparameter is missing.
Thanks,
There was syntax error in If() statemnets. Can you try below.
If this solution helps, Please mark it as best answer.
Thanks,