I have the following AMPScript:
%%[ var @Custom_2, @variable set @Custom_2 = Custom_2 if Not Empty(@Custom_2) then set @variable = concat(" ",@Custom_2) elseif Empty(@Custom_2) then set @variable = "" endif ]%%
And am printing the results in an email with:
Custom_2 is a nullable text field. When previewing a record with an empty Custom_2, the word 'FALSE' is printed when the expected value is nothing should be printed.
Using this AMPscript below resolves the issue, as does renaming the Custom_2 field to anything else, but I don't understand why.
if Not Empty(@Custom_2) AND Not(@Custom_2 == "False") then set @variable = concat(" ",@Custom_2) endif
Both Custom_1 and Custom_2 share the same field properties. I've tried deleting the field from the data extension then re-adding it, only to encounter the same issue.
Is there documentation that explains why this would be occurring?