Email sender - Change table row color based on value
Hi snaplogic experts,
is it possible to change table row in email body based on current value ? in my example i retrieve email with values - but is it possible to mark whole row as green, if revenue is higher as e.g. $5000?
just to make email readable
my example:
<!DOCTYPE html><html><head><style type="text/css"> </style></head>
<body>
<table>
<tr>
<th>Branch</th>
<th>City</th>
<th>Revenue</th>
</tr>
<tr>
<td>$branch</td>
<td>$city</td>
<td>$revenue</td>
</tr>
</table>
</body>
</html>
thank you
adam_gataev - you have the right terminology. Just use a Mapper as follows:
Here I'm just using two Array methods: concat() and pop() to complete your goal in one expression. The Array.pop() removes the last element and returns that element. The Array.concat() creates a new array with the new element added in.
Note that I'm also using the "pass-through" option on the Mapper settings. This allows any other elements in the input doc to flow through to the target path without specifying them.
Hope this helps!
You're the man koryknick, thank you so much!