How to hide table rows in an email when the token is empty

Highlighted
Level 2

How to hide table rows in an email when the token is empty

Does anyone know how to hide a row in a table when the value in the data is zero/empty.

I need to hide the tokens when the field value is blank so that the table resizes. Can anyone help with this?

Many thanks in advance.

2 REPLIES 2
Highlighted
Level 10 - Community Moderator

Re: How to hide table rows in an email when the token is empty

This is only possible if you're outputting all or part of the table from Velocity.

 

If you are, then it's as simple as

#if( !$lead.YourFieldName.isEmpty() )
<tr><td>This entire table row will only be included if the field has a value</td></tr>
#end

 

Highlighted
Level 2

Re: How to hide table rows in an email when the token is empty

Thank you.