Skip to main content
Milo Gaster (Sky UK) 님이 #Formulas에 질문했습니다

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개
  1. 2024년 6월 21일 오후 4:21

     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")," ")