Campaign Standard Loop process

Avatar

Avatar

daver37819942

Avatar

daver37819942

daver37819942

18-03-2021

I was hoping this would have been simple within html to check add index of a field and publish different copy block.

So I added this:

<!--LOGIC for Gift -->
<% if (DCECURRENTITEM && DCECURRENTITEM.paymentType && DCECURRENTITEM.paymentType.toString().indexOf('Gift') !=-1 ) { %>
Refunded to card starting in <span class="acr-field nl-dce-field" data-nl-expr="DCECURRENTITEM/pmtCardNumber" data-nl-type="string" contenteditable="false">Payment Number (pmtCardNumber)</span><br>
<% }
else { %>
Refunded to card ending in <span class="acr-field nl-dce-field" data-nl-expr="DCECURRENTITEM/pmtCardNumber" data-nl-type="string" contenteditable="false">Payment Number (pmtCardNumber)</span><br><% } %>
<!-- END GC CHECK -->

When when sending we get the following error.

Error while compiling script 'DM8155[textdefaultContent]' line 37: DCECURRENTITEM is not defined.

 

Yet looking at the Mirror page of the delivery... it looks as if it is working as desired.

 

Can someone help and explain why or what I'm missing?

Accepted Solutions (0)

Answers (0)