Skip to main content
Level 3
Sep 27, 2019 8:56 PM UTC
Solved

Help: If and statement

using the Campaign Classic expression editor i'm trying to create the following:

  • If home phone number is null then display mobile phone number.
  • If home phone and mobile phone is  null then display "contact customer care to update your contact information".

I'm having trouble getting this to work and would appreciate some direction.  Below is what i currently have:

Iif(@MOBILE_NUM is Null, @X_HOME_PH_NUM, Iif(@X_HOME_PH_NUM is Null and @MOBILE_NUM Is Null, "Call Customer Services to Update Number – 1-800-RED-CROSS", @MOBILE_NUM))

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ayushman_108494
ayushman_108494Accepted solution
Adobe Employee
Sep 29, 2019 9:06 PM UTC

This should give you the desired result:

Iif(@X_HOME_PH_NUM is Null and @MOBILE_NUM Is Null, "Call Customer Services to Update Number – 1-800-RED-CROSS",Iif(@X_HOME_PH_NUM Is Null, @MOBILE_NUM, @X_HOME_PH_NUM))

Thanks,

Ayushman

3 replies

ayushman_108494
Adobe Employee
ayushman_108494Adobe EmployeeAccepted solution
Adobe Employee
Sep 29, 2019 9:06 PM UTC

This should give you the desired result:

Iif(@X_HOME_PH_NUM is Null and @MOBILE_NUM Is Null, "Call Customer Services to Update Number – 1-800-RED-CROSS",Iif(@X_HOME_PH_NUM Is Null, @MOBILE_NUM, @X_HOME_PH_NUM))

Thanks,

Ayushman

Translate
wpomeroyAuthor
Level 3
Sep 30, 2019 1:20 PM UTC

worked perfectly.  thank you!  Apparently my issue was with order of operations -- good to know.

Translate
ayushman_108494
Adobe Employee
Adobe Employee
Sep 30, 2019 1:26 PM UTC

I am glad that this worked for you!!!

Translate