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
mlgillmlgill 

IMAGE field Problem

for the life of me I cannot get this to work. I have a custom formua field call SIGNAL. Based on the YES or NO value in another field called Past_Due_Check_c  I want the SIGNAL field to display a RED or GREEN image. I continue to get syntax errors in the code as show below. Driving me crazy. can anyone help?

 

IMAGE(
CASE(Past_Due_Check__c,
"NO", "servlet/servlet.FileDownload?file=01570000000wgFz",
"YES", "servlet/servlet.FileDownload?file=01570000000wgG4"))

JulianneJulianne
Maybe try using ISPICKVAL instead of CASE?  I have an image formula, but it uses IF and a date field.
Message Edited by Julianne on 04-03-2009 11:09 AM
Steve :-/Steve :-/
Here's a simple image CASE

IMAGE( "/servlet/servlet.FileDownload?file=" &CASE( RecordTypeId , "012400000000klW", "01540000000KtPC","01540000000Kvki"),"Contact Type")

 

formula I have on my Contact page
Kent ManningKent Manning

Your problem is that your case function needs to have an else statement on the end.  So the syntax would be:

 

CASE(Past_Due_Check__c,
"NO", "servlet/servlet.FileDownload?file=01570000000wgFz",
"YES", "servlet/servlet.FileDownload?file=01570000000wgG4&quo, "else result")

 

I also think your Image function needs a name like "Priority Flag".

 

So your revised formula should be something like:

 

IMAGE(CASE(Past_Due_Check__c,
"NO", "servlet/servlet.FileDownload?file=01570000000wgFz",
"YES", "servlet/servlet.FileDownload?file=01570000000wgG4&quot, "/s.gif"), "Priority Flag" )

 

That will probably resolve the syntax errors.

 

BlankaBlanka

Thanks Bioscience Man.

I have tried this also and still having the same issues as MLGill. I will keep trying and if I come up with something else I will post my solution.