I would like to change a rating from 5-star to 3-star. I created a picklist titled, "Grade," and the values are 1,2,3. Then I have a formula field with the following,
IMAGE( CASE(Grade__c, "1", "/img/samples/stars_100.gif", "2", "/img/samples/stars_200.gif", "3", "/img/samples/stars_300.gif", "/img/samples/stars_000.gif"), "WAS Rating")
Even though I only selected 1,2,3 for my picklist and 1,2,3 in the formula, the field still shows 5 available stars. I want this to show 3 available stars. Please let me know how I can do this.
Thanks,
Mike
#Service Cloud #Marketing Cloud #Analytics #Trailhead #Automation
Hi Michael,
The issue is that /img/samples/stars_100.gif, stars_200.gif, and stars_300.gif are Salesforce's sample images, and those images are based on the standard 5-star rating scale. Changing the picklist values doesn't change the number of stars in the image itself.
If you want a true 3-star display, you'll need to use your own 3-star image files as a Static Resource and reference those in the formula.
For example:
IMAGE(
CASE(
Grade__c,
"1", "/resource/YourStarResource/star_1.png",
"2", "/resource/YourStarResource/star_2.png",
"3", "/resource/YourStarResource/star_3.png",
"/resource/YourStarResource/star_0.png"
),
"Rating"
)
Create the appropriate 0-, 1-, 2-, and 3-star images and upload them as a Static Resource. That way the displayed scale is actually limited to 3 stars.