Skip to main content
Level 1
Aug 12, 2021 2:35 PM UTC
Solved

Hide unused token fields

Hi, 

I've tried to find a solution for this before posting, but couldn't find an appropriate solution. 

What I'm trying to do is to essentially create a list in an email that's driven by an excel sheet.  

 

For example, in each email, there's 6 token fields that needs to be populated with info. However, not all token fields will be used for all versions of the email. It can go from 1-6. My question is, is it possible to hide the fields that are not populated with info, so the spacing of the email will look correct. 

 

  1. <Parameters 1>, <Parameters 1a>
  2. <Parameters 2>, <Parameters 2a>
  3. <Parameters 3>, <Parameters 3a>
  4. <Parameters 4>, <Parameters 4a>
  5. <Parameters 5>, <Parameters 5a>
  6. <Parameters 6>, <Parameters 6a>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Aug 12, 2021 11:28 PM UTC

Quiet references won't quite cut it because they quiet null values, not empty values.

 

You want my #displayIfFilled logic: https://nation.marketo.com/t5/product-blogs/streamline-your-script-tokens-with-a-displayiffilled-velocimacro/ba-p/244175

2 replies

Oz_Platero
Level 6
Aug 12, 2021 8:56 PM UTC

Hello @tsangto ,

 

One way to do it is via velocity scripting + quiet reference (no value no output). Albeit, is has a small learning curb for basic features.

 

Email scripting documentation around quiet reference

 

Translate
SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Aug 12, 2021 11:28 PM UTC

Quiet references won't quite cut it because they quiet null values, not empty values.

 

You want my #displayIfFilled logic: https://nation.marketo.com/t5/product-blogs/streamline-your-script-tokens-with-a-displayiffilled-velocimacro/ba-p/244175

Translate