Skip to main content
Level 3
9月 27, 2019 8:56 午後 UTC
解決済み

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.

このトピックへの返信は締め切られました。
ayushman_108494
Adobe Employee
9月 29, 2019 9:06 午後 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 の返信

ayushman_108494
Adobe Employee
Adobe Employee
9月 29, 2019 9:06 午後 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

翻訳
wpomeroy作成者
Level 3
9月 30, 2019 1:20 午後 UTC

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

翻訳
ayushman_108494
Adobe Employee
Adobe Employee
9月 30, 2019 1:26 午後 UTC

I am glad that this worked for you!!!

翻訳