Skip to main content
El-Coder
Level 2
January 20, 2021
Solved

For loop Script in Html diffusion

  • January 20, 2021
  • 3 replies
  • 1487 views

Hello community,
I'm trying to do a loop in the html and concatenate fields that I want to retrieve in the mail with the increment value i of the for loop,
Here is the script I used but it didn't work,


<script> <% for(var i=0;i<5;i++) { %>  </script>
<%= i %> - <%=context.targetData.AllWkf1.name_wkf %>
<script><%}%> </script>

 

What i want is to concatenate the value i with the AllWkf and loop it until I retrieve the values that I want,
For Example : 
context.targetData.AllWkf1.name_wkf
context.targetData.AllWkf2.name_wkf

context.targetData.AllWkf3.name_wkf

context.targetData.AllWkf4.name_wkf

...

Could anyone help me with this ?

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

Hello 

 

Scripting is not officially allowed in ACS.

Thanks,

David

3 replies

DavidKangni
Adobe Champion and Community Advisor
DavidKangniAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
January 21, 2021

Hello 

 

Scripting is not officially allowed in ACS.

Thanks,

David

David Kangni
El-Coder
El-CoderAuthor
Level 2
January 21, 2021

HI @davidkangni , Thank you for your time,
I would like to know if scripting will be allowed in ACS future releases?