08-26-2024 02:39 PM
Hi,
I am working to send multiple tables in a single email using XML Parser.
I am using Groupby Field snap to for group respective categories and send out details of each category as a table(in a single mail)
Following is the structure of JSON file.
[{ "source_system_group": "group1", "source_system_details": {"Details_1": value1},{"Details_2": value2}, {Details_3: value_3} } { "source_system_group": "group2", "source_system_details": {"Details_1": value1},{"Details_2": value2}, {Details_3: value_3} }
{ "source_system_group": "group3", "source_system_details": {"Details_1": value1},{"Details_2": value2}, {Details_3: value_3} } ]
I cannot call and populate individual tables and values. Following is my HTML Code. Review and let me know.
<html>
<head>
<style>
table {
width: 100%;
border: 1px solid black;
}
thead th {
background: black;
color: white;
border: 1px solid black
}
tbody tr:nth-child(even) {
background: #D9D9D9;
}
td {
padding: 5px;
border: 1px solid black;
}
</style>
</head>
<body>
<p>Hi, </p>
<p>Following is the status of data load </p>
<p></p>
$foreach (item in $)
<h2>$item.source_system_group</h2>
<table>
<thead>
<tr>
<th>SDP_SOURCE_SYSTEM_CODE</th>
<th>TARGET_TABLE</th>
<th>LAST_REFRESH_DATE</th>
</tr>
</thead>
<tbody>
$foreach(details in item.source_system_details)
<tr>
<!--check for load value before selection of the table values-->
<td>$details.Details_1</td>
<td>$details.Details_2</td>
<td>$details.Details_3</td>
</tr>
$end
</tbody>
</table>
$end
<p>Regards,</p>
<p></p>
</body>
</html>
Solved! Go to Solution.
08-27-2024 09:40 AM
@pranjbhatt - please refer to this other thread where I posted an answer that I believe will solve this for you.
Hope this helps!
08-27-2024 09:40 AM
@pranjbhatt - please refer to this other thread where I posted an answer that I believe will solve this for you.
Hope this helps!