Expand my Community achievements bar.

Campaign Standard Loop process

Avatar

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?

1 Reply

Avatar

Level 2

Hi

same issue.

Any hints about how to process list items in declarative Javascript in ACS?

 

Thanks,

Fabio