List of objects as a table in Email message.

0
Hi everyone,    i would like to send an email to the user within a table a list of objects.  Lets say my headers are. Name, Count, Error message. I would like to show it as a table. Can someone provide me the logic? Thanks.
asked
3 answers
2

Hi Selcuk,

For the, what you can do is, you can use the <table></table> tag in HTML, and then iterate through each item of the list and then create the <tr></tr> elements for each object.

 

Let me know, if you have any issues,

Rishabh

(resilient it services)

answered
0

That was the solution thanks Rishabh.

image.png

htmlTable: '<table border="1" cellpadding="5" cellspacing="0"><tr><th>Name</th><th>Count</th><th>Error Message</th></tr>' 

change variable: $htmlTable + '<tr><td>' + $IteratorValidationRecord/Name + '</td><td>' + toString($IteratorValidationRecord/Count) + '</td><td>' + $IteratorValidationRecord/ErrorMessage + '</td></tr>'  

one more change variable to cloe the table $htmlTable + '</table>'

answered
0

Hi Selcuk,

you can use HTML table tag logic <table></table> in string variable and  iterate them for each items.

Then pass this variable in email content body.

 

answered