I have an email that is in build with a large amount of IF statements contained within the email.
The concept of the email is that if the 10 item fields are populated then show all 10 within the body of the email via if statments which will display the name and price of the item.
I am encountering a strange issue whereby if i try to render a preview with all 10 of the items populated. the 6th item if statement is ignored every time and only 9 rows of text display.
I have the fields set as variables like so:
SET @item1 = AttributeValue("item1")
SET @item2 = AttributeValue("item2")
SET @item3 = AttributeValue("item3")
SET @item4 = AttributeValue("item4")
SET @item5 = AttributeValue("item5")
SET @item6 = AttributeValue("item6")
SET @item7 = AttributeValue("item7")
SET @item8 = AttributeValue("item8")
SET @item9 = AttributeValue("item9")
SET @item10 = AttributeValue("item10")
Within the body of the email i turn the display of text on and off by referncing values in these fields.
The email is built in sections so the 10 IF statments are contained within one wrapping if statement to turn on and off the area dependent on
%%[IF @DisplayPurchased == 'True' THEN]%%
%%[ IF @item1 == 'Purchased' THEN]%%
%%=Propercase(@item1Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item2 == 'Purchased' THEN]%%
%%=Propercase(@item2Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item3 == 'Purchased' THEN]%%
%%=Propercase(@item3Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item4 == 'Purchased' THEN]%%
%%=Propercase(@item4Name)=%%<br>
%%[ENDIF]%%
%%[ IF @item5 == 'Purchased' THEN]%%
%%=Propercase(@item5Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item6 == 'Purchased' THEN]%%
%%=Propercase(@item6Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item7 == 'Purchased' THEN]%%
%%=Propercase(@item7Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item8 == 'Purchased' THEN]%%
%%=Propercase(@item8Name)=%% <br>
%%[ENDIF]%%
%%[ IF @item9 == 'Purchased' THEN]%%
%%=Propercase(@item9Name)=%% <br>
%%[ENDIF]%%
%%[IF @item10 == 'Purchased' THEN]%%
%%=Propercase(@item10Name)=%% <br>
%%[ENDIF]%%
%%[ENDIF]%%
All item field values 1-10 are set to 'Purchased'.
Expected outcome is for all 10 to display, only 9 do.
Testing i have done:
- Changed item 6 attribute value to = AttributeValue("item7") which results in all 10 items showing.
- Cleared and re-uploaded data into the data extension for item 6, copied directly from other items to ensure 'Purchased' is identical.
- Rebuilt the data extension from scratch.
- Pasted the variable of item 6 %%=v(@item6)=%% to the email in text form. It comes up as 'Purchased' just as expected.
- Created and referenced a new field for the item 6 set statement and changed the variable referenced within item6.
Placed the item 6 if statement by itself at the top of the email. If the variable @item6 is SET @item6 = = AttributeValue("item6") it DOES NOT display. If this is set to AttributeValue("item7") it does display..
%%[ IF (@item6 == 'Purchased') THEN]%% %%=Propercase(@item6)=%%
%%[ENDIF]%%set @item6 field in the DE to 'Purchase' instead of 'Purchased' and it shows
Does SFMC have a limit of how many identical field values can be searched in an email even across separated if statements? it appears that no matter how it comes through if there are 10 of the same value looked at across any if statements in the email that SFMC will ignore the 6th of the 10 in total in my example above ^
Any assistance greatly appreciated.