How to fill row color with criteria which is sent via Office365Outlook.SendEmailV2 HTML table?
Current Output:
Selected Item | Item | Item Group | Item ID | Item loaded | Item Load original | Item loaded check | Date and Time | Creator |
171 | 171 | GRP | 1 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 915 | GRP | 2 | true | false | false | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 3 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 4 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 915 | GRP | 5 | true | false | false | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 6 | false | true | false | NA | |
171 | 171 | GRP | 7 | false | true | false | NA |
Wanted output:
If Item_loaded = true and item_loaded_check = false, then red.
if Item_loaded = false and item_loaded_check = false then yellow.
Selected Item | Item | Item Group | Item ID | Item loaded | Item Load original | Item loaded check | Date and Time | Creator |
171 | 171 | GRP | 1 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 915 | GRP | 2 | true | false | false | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 3 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 4 | true | true | true | 2099-99-99 10:15:44 | NA |
171 | 915 | GRP | 5 | true | false | false | 2099-99-99 10:15:44 | NA |
171 | 171 | GRP | 6 | false | true | false | NA | |
171 | 171 | GRP | 7 | false | true | false | NA |
Current Code:
Office365Outlook.SendEmailV2(
"Name.name@name.nt",
"CheckList",
"<h3></h3>" &
"<strong></strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Selected Item</th>
<th>Item</th>
<th>Item Group</th>
<th>Item ID</th>
<th>Item Loaded</th>
<th>Item Load Original</th>
<th>Item Loaded Check</th>
<th>Date and Time</th>
<th>Creator</th>
</tr>
<tr>" &
Concat(colExternalLoading,
"<td>" & varselecteditemid& " </td>
<td>" & item & " </td>
<td>" & itemgroup & " </td>
<td>" & itemid& " </td>
<td>" & loaded & " </td>
<td>" & loaded_original & " </td>
<td>" & load_check & " </td>
<td>" & Text(date_loaded, "yyyy-mm-dd hh:mm:ss") & " </td>
<td>" & User().FullName & " </td>","</tr><tr>"
)
&
"</table>",
{
IsHtml:true
}
));
Thank you.
Solved! Go to Solution.
Hey @flowslcaplikas
We can format the row conditionally during your Concat action, like this: (EDIT, removed the last <tr> as was duplicated during concat)
Office365Outlook.SendEmailV2(
"Name.name@name.nt",
"CheckList",
"<h3></h3>" &
"<strong></strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Selected Item</th>
<th>Item</th>
<th>Item Group</th>
<th>Item ID</th>
<th>Item Loaded</th>
<th>Item Load Original</th>
<th>Item Loaded Check</th>
<th>Date and Time</th>
<th>Creator</th>
</tr>" &
Concat(colExternalLoading,
"<tr " & If(loaded && !load_check,
"style='color: red;'>",
!loaded && !load_check,
"style='color: orange;'>",
">"
)
& "<td>" & varselecteditemid& " </td>
<td>" & item & " </td>
<td>" & itemgroup & " </td>
<td>" & itemid& " </td>
<td>" & loaded & " </td>
<td>" & loaded_original & " </td>
<td>" & load_check & " </td>
<td>" & Text(date_loaded, "yyyy-mm-dd hh:mm:ss") & " </td>
<td>" & User().FullName & " </td>","</tr>"
)
&
"</table>",
{
IsHtml:true
}
));
Chers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hey @flowslcaplikas
We can format the row conditionally during your Concat action, like this: (EDIT, removed the last <tr> as was duplicated during concat)
Office365Outlook.SendEmailV2(
"Name.name@name.nt",
"CheckList",
"<h3></h3>" &
"<strong></strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>Selected Item</th>
<th>Item</th>
<th>Item Group</th>
<th>Item ID</th>
<th>Item Loaded</th>
<th>Item Load Original</th>
<th>Item Loaded Check</th>
<th>Date and Time</th>
<th>Creator</th>
</tr>" &
Concat(colExternalLoading,
"<tr " & If(loaded && !load_check,
"style='color: red;'>",
!loaded && !load_check,
"style='color: orange;'>",
">"
)
& "<td>" & varselecteditemid& " </td>
<td>" & item & " </td>
<td>" & itemgroup & " </td>
<td>" & itemid& " </td>
<td>" & loaded & " </td>
<td>" & loaded_original & " </td>
<td>" & load_check & " </td>
<td>" & Text(date_loaded, "yyyy-mm-dd hh:mm:ss") & " </td>
<td>" & User().FullName & " </td>","</tr>"
)
&
"</table>",
{
IsHtml:true
}
));
Chers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
User | Count |
---|---|
256 | |
110 | |
90 | |
51 | |
44 |