Skip to main content

Hi Everyone,

 

I'm trying to add a formula into a newly created field where I'd like an image to display based on whether the field is a specific value.  This is to be included in a Highlights Panel on a Compact Layout.

 

The error message is "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2" and I'm unsure of what I have missed out of my formula below:

 

IF( RecordTypeId = "Master Event", IMAGE("https://skyplanit--fullplanit.sandbox.file.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId=0681q000008mIMj&operationContext=CHATTER&contentId=05T1q00000PDlGD","PlanIt Logo Landscape"))

 

Any help would be greatly appreciated.

 

Thanks in advance!

 

Milo

3 answers
  1. Jun 21, 2024, 4:21 PM

     Hi @Milo Gaster

     

    To fix this error, add a third parameter to the "IF" function, which will be the value to return if condition is false. In this case, you can use blank string or default image.

     

    Try using this formula with the third parameter as a blank string

     

    IF( RecordTypeId = "Master Event", IMAGE("https://skyplanit--fullplanit.sandbox.file.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Jpg&versionId=0681q000008mIMj&operationContext=CHATTER&contentId=05T1q00000PDlGD","PlanIt Logo Landscape")," ")

0/9000