Skip to main content

I am having trouble with "Create a formula field to display an image"

 i have tried the  options given on our community and nothing  

IMAGE(   CASE( Lead_Quality_Helper__c, 0 = "/img/samples/stars_000.gif with alternate text '0 stars" 1 = "/img/samples/stars_100.gif with alternate text '1 star" 2 = "/img/samples/stars_200.gif with alternate text '2 stars" 3 = "/img/samples/stars_300.gif with alternate text '3 stars" 4 = "/img/samples/stars_400.gif with alternate text '4 stars" 5 = "/img/samples/stars_500.gif with alternate text '5 stars" ))

3 件の回答
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    2021年12月2日 15:51

    Hi Indira,

     

    I think you are trying to do this:

    CASE( Lead_Quality_Helper__c,

    0,IMAGE("/img/samples/stars_000.gif","0 stars"),

    1,IMAGE("/img/samples/stars_100.gif","1 star"),

    2,IMAGE("/img/samples/stars_200.gif","2 stars"),

    3,IMAGE("/img/samples/stars_300.gif","3 stars"),

    4,IMAGE("/img/samples/stars_400.gif","4 stars"),

    5,IMAGE("/img/samples/stars_500.gif","5 stars"), NULL ))

    If you don't care too much about the alternate text, you can go with:

    IMAGE(CASE( Lead_Quality_Helper__c,

    0,"/img/samples/stars_000.gif","0 stars",

    1,"/img/samples/stars_100.gif","1 star",

    2,"/img/samples/stars_200.gif","2 stars",

    3,"/img/samples/stars_300.gif","3 stars",

    4,"/img/samples/stars_400.gif","4 stars",

    5,"/img/samples/stars_500.gif","5 stars", NULL ),"Star rating")

0/9000