Skip to main content

Hello fellow trailblazers!

I'm working on creating a classic email template. I want to use an if than statement with two merge fields using OR logic. Does anybody have any ideas or know if this is possible? The if than statement works if I just use one merge field but not two. I have also tried use || instead of OR.  The formula shown below is similar to the one I'm working on. 

 

{!IF (!Opportunity.Ck_County__c=TRUE OR !Opportunity.Ck_Hometown__c=TRUE,"", "Please update address.")}

 

#Classic Email Template #Salesforce Developer #HTML Email Template #Email Template #Salesforce Admin

9 answers
  1. Dec 21, 2022, 8:52 PM

    I haven't don't this in a Mail Merge, but the "Formula" formula syntax would be like

    IF(

    OR(

    !Opportunity.Ck_County__c = TRUE ,

    !Opportunity.Ck_Hometown__c = TRUE

    ),

    NULL,

    "Please update address.")

0/9000