I'm modifying an email template to check if a state value is true or not, if it is, display a specific value, otherwise, display a default message.
My code is as follows:
%%[
IF @Ship_State == "CO" THEN
SET @TaxDisplay = "Not collected"
ELSEIF @Ship_State == "LA" THEN
SET @TaxDisplay = "Not collected"
ELSEIF @Ship_State == "VT" THEN
SET @TaxDisplay = "Not collected"
ELSE
SET @TaxDisplay = Format([OrderTax],"$#,#.00")
]%%
%%[ENDIF]%%
%%=v(@TaxDisplay)=%%
I've checked the data of @Ship_State, and it is always a two letter abbreviation with capital letters. So it's not a legitimate data mismatch issue.
When testing the email, seemingly half the time when ship state is CO, LA, or VT it either correctly outputs "Not collected" or it doesn't when it should.