Re: Dollar signs in front of tokens

Anonymous
Not applicable

Dollar signs in front of tokens

Hi, has anyone had issues putting a dollar sign in front of a token? For one particular email, the token was working properly but for some reason now the value in the email is just displayed as "}" instead of the value populated in the field. Also, the value is populated correctly and everything on the field because when I remove the dollar sign it pulls in the number.

I have it in my email template as: ${{ }}

Any help here would be appreciated. Thanks!

12 REPLIES 12
Jim_Thao7
Level 9

Re: Dollar signs in front of tokens

I believe this is an issue with the email scripting.  Although you're not using email scripting, email scripting reserves these characters for use in Marketo.

Instead, use the HTML escape code instead of the $: <span>&#36;</span>

Anonymous
Not applicable

Re: Dollar signs in front of tokens

Thanks Jim, this is really helpful and is a good short term solution! It still seems weird that it worked totally fine for months and then suddenly stopped working in our templates...especially since these are just text tokens.

SanfordWhiteman
Level 10 - Community Moderator

Re: Dollar signs in front of tokens

I can't repro this.  It's inevitable that there could be a delimiter collision (that's what it's called when it isn't clear whether a character is special or not) but this particular structure ${{lead.token}} doesn't trigger it on my primary instance.

It's true, like Jim said, that Velocity is used whether or not you add your own VTL tokens. I've found that some instances have a different order-of-operations than others, unfortunately, so the same text can be parsed different ways when you count the whole Marketo userbase.

Anonymous
Not applicable

Re: Dollar signs in front of tokens

Hi Sanford Whiteman ,

I am trying to add in a dollar sign in front of a velocity script token that is pulling in custom object lead data.

I have tried:

<span> $&#8203;</span> {{my.RoboSave Saving :default=edit me}} & <span> <span>&#36;</span>;</span> {{my.RoboSave Saving :default=edit me}} --- and it's breaking the token and then scrambling the copy directly underneath it.

The VELOCITY SCRIPT is below also.

##Access Leads estimated saving for that RoboSave Auto Switch.

#set( $lastItem = $energyAutoSwitch_cList[$math.sub($energyAutoSwitch_cList.size(),1)] )

#set($savingsFound=$lastItem.savingsFound__c)

$savingsFound

From your experience are you able to shed any light into why this token is breaking? Is something linked to the script?

Any insight would be greatly appreciated!

Regards,

Emily

SanfordWhiteman
Level 10 - Community Moderator

Re: Dollar signs in front of tokens

Why not output the dollar sign from Velocity as well?

${esc.d}${savingsFound}

Anonymous
Not applicable

Re: Dollar signs in front of tokens

Great - it worked!!

Thanks!

Emily.

Angie_Zarate
Level 2

Re: Dollar signs in front of tokens

What exactly worked. I am having that same issue.

Angie

SanfordWhiteman
Level 10 - Community Moderator

Re: Dollar signs in front of tokens

Outputting the dollar sign, using the special symbol ${esc.d}, from Velocity (not in the email itself).

Angie_Zarate
Level 2

Re: Dollar signs in front of tokens

Thanks.