Creating a MyToken with a Null Value | Community
Skip to main content
KCS_Integration
Level 2
September 10, 2020

Creating a MyToken with a Null Value

  • September 10, 2020
  • 0 replies
  • 534 views

Issue

Sometimes there can be a circumstance where a text token should hold null value. Since the token must contain a value, you need to insert a value that will display as empty when the token is rendered.

 

 


Solution

Adding a HTML comment to the on the Text {{my.token}} side would work.

 

<!-- --> 


If you're just plopping the token into your HTML, this will be fine. If you're embedding it in Javascript then you can still check for that specific value, it just won't be "magic":

 

if ( "{{my.token}}" != "<!-- -->" ) { 

  // it's not empty 

 

 


 


This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.