Campaign Standard Loop process | Community
Skip to main content
daver37819942
March 18, 2021
Question

Campaign Standard Loop process

  • March 18, 2021
  • 1 reply
  • 1262 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

November 23, 2021

Hi

same issue.

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

 

Thanks,

Fabio