Help: If and statement

wesp27904446

27-09-2019

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.

Accepted Solutions (1)

Accepted Solutions (1)

ayushman_108494

Employee

29-09-2019

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