Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Campaign Standard Loop process

daver37819942
Level 3
Level 3

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?

0 Replies