Skip to main content
I built out a formula field that is supposed to display an image based on values of other fields, however, the field isn't displaying anything and I can't figure out why. There was no syntax error when I created the formula field and I've created a similar formula field in the past that worked just fine so I'm a little confused. Below is what the formula currently looks like. Initially, the formula used "IF" instead of "CASE" because that's what the previous formula used when I had no issues but some things have changed which is what prompted me to create a new formula field and when I created it using "IF" I kept getting a syntax error that my formula compilation size was too big and when I did some digging I came across several suggestions stating I could swap "IF" with "CASE" which is what I did below but now no image gets displayed. 

 

CASE(NUMBER_SYSTEM_Infraction__c * (2 * SYSTEM_GPANEW__c) + Service_Hrs_Achieved_By_Grade__c + NUMBER_SYSTEM_Truancy__c, 

 

7, IMAGE("/img/samples/color_green.gif", "green", 30, 30), 

 

6, IMAGE("/img/samples/color_green.gif", "green", 30, 30), 

 

5, IMAGE("/img/samples/color_yellow.gif", "yellow", 30, 30), 

 

4, IMAGE("/img/samples/color_yellow.gif", "yellow", 30, 30), 

 

IMAGE("/img/samples/color_red.gif", "red", 30, 30) 

 

)
19 respostas
  1. 10 de jul. de 2018, 18:49
    It looks like Service Hours Achieved by Grade is blank, in your Formula Field which option did you select for "Treat blank fields as"?   If you're doing any kind of Math you wanna select "Treat as Zeros" otherwise your Math will "break" unless you append your Formula to Convert the Blank Fields.   
0/9000