Is there a way to set tokens to output either true or false/yes or no instead of 1 or 0? | Community
Skip to main content
May 8, 2013
Question

Is there a way to set tokens to output either true or false/yes or no instead of 1 or 0?

  • May 8, 2013
  • 3 replies
  • 4390 views
Is there a way to set tokens to output either true or false/yes or no instead of 1 or 0?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Jep_Castelein2
Level 10
May 9, 2013
Use a text field instead of a boolean. The boolean field will contain the value that was entered, which could be either true/false, yes/no or 0/1. So if you upload a list with true/false, that's what the token will output. If you upload a list with yes/no, then that's what will be outputted. 

UPDATE: This is NOT CORRECT, see my explanation below
May 9, 2013

I had written the following article for the commuity but it was recently deleted:

Boolean checkbox fields actually store the value 0 when unchecked (false) and 1 when checked (true).

Boolean fields are available to be used as tokens in emails and landing pages but by default they will just return 0 or 1 depending on whether or not the value is checked. This may not be very presentable to your leads, for example if you use a subscription centre where newsletters are checkboxes and you might want to send an email to subscribers showing them what they have and have not subscribed to.

If you just use the token that represents the standard boolean field then the check mark you see in the above email will be a the number 1.

In Admin go to field management click on New Custom field and you can create a new Marketo only field of type formula. You will add an if choice and specify the name of the boolean field like below


This formula field looks at the boolean field and displays ✓ if the real checkbox field has been checked (True), if not it displays the default value ✘.

So you would just need to replace the symbols with TRUE/FALSE.
 

Jean-Pascal_Mer
Level 4
August 7, 2015

This does not seem to work anymore as I can't see how to create a Marketo field only in the Field Management. Has anyone any other way to do this?

Thanks

JP

Jean-Pascal_Mer
Level 4
August 10, 2015

Nevermind. I'm dumb.

Jep_Castelein2
Level 10
May 9, 2013
Cathal: that is a great solution, thanks. 

I did test my earlier statement, and it was not correct. Boolean is indeed stored as 0 and 1. The only situation where I saw it being exported as I described above (yes/no or true/false) was a situation that was customized for a particular customer, so it would not apply to other Marketo customers.