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

For loop Script in Html diffusion

Avatar

Avatar
Validate 1
Level 1
El-Coder
Level 1

Likes

0 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
El-Coder
Level 1

Likes

0 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
El-Coder
Level 1

20-01-2021

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 ?

View Entire Topic

Avatar

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

255 likes

Total Posts

372 posts

Correct Reply

151 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

255 likes

Total Posts

372 posts

Correct Reply

151 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile
DavidKangni
MVP

21-01-2021

Hello 

 

Scripting is not officially allowed in ACS.

Thanks,

David