use fragment to loop data within a workflow and create dynamic email content | Community
Skip to main content
Level 2
February 18, 2021
Solved

use fragment to loop data within a workflow and create dynamic email content

  • February 18, 2021
  • 2 replies
  • 1300 views

Hi,


I am trying to personnalize an email with data coming from enrichment activity (additional data) but all values are undefined.


I have created two queries :


a query fetching one specific user (me)

a query fetching all user who have received a delivery the day before today.


I have enriched my profil with the unique deliveries from the second query in an enrichment box. I have created a collection of 10 in that enrichment.


I would like to create a loop in order to display the collection in email delivery with a fragment by fetching this collection and displaying it as long as it it true.


My fragment look like :

<table>
<%
for each(query in context.targetData){
%>
<tr>
<td><%= query.query1 %></td>
</tr>
<%
}
%>
</table>


All values are undefined.


Please advise on how to proceed in order to fetch additionnal data in delivery in ACS Standard.


Julius

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 Venu_Reddy

Hi @juliusg73170081 ,

 

Create content block and initialize the attributes with a variable and call it in the email delivery.

 

Regards,

Venu

 

 

2 replies

Venu_Reddy
Venu_ReddyAccepted solution
Level 6
February 28, 2021

Hi @juliusg73170081 ,

 

Create content block and initialize the attributes with a variable and call it in the email delivery.

 

Regards,

Venu

 

 

Sukrity_Wadhwa
Community Manager
Community Manager
March 10, 2021

Hi @juliusg73170081,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!

Sukrity Wadhwa