2

%%[IF AccountNumber == "12345" THEN]%% html %%[ELSE]%% html %%[ENDIF]%%

Explodes when attempting to validate:

Error 1: Script IF Statement Invalid
An error occurred when attempting to resolve a script expression. See inner exception for detail.

Script Expression: AccountNumber MemberID: 1234567 JobID: 0 An unrecognized expression appears in a script block.

Script Expression: AccountNumber MemberID: 1234567 JobID: 0
Invalid Content:
IF AccountNumber == "12345" THEN]%% !!plain text stuff!! %%=WorkOrderNumber=%%. %%[

Not exactly helpful.

Checked data extension exists, is populated.

1
  • 2
    is this marketing cloud? you should tag it as such. thx!
    – pchittum
    Commented Feb 23, 2016 at 21:32

1 Answer 1

2

My recommendation would be to set a variable for the Data Extension column or Personalization String using the AttributeValue() function. It handles missing objects better, which is likely your issue.

%%[

var @AccountNumber 
set @AccountNumber = AttributeValue("AccountNumber")

]%%

%%[IF @AccountNumber == "12345" THEN]%%

  account content

%%[ELSE]%%

  default content

%%[ENDIF]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .