Skip to main content
Paul_Johnson
Level 4
Jul 28, 2016 10:32 PM UTC
Solved

Email Script $ for tokens

I have a handful of custom fields I need dollar signs put before in an email I'm sending out. I'm having a hard time making an email script that will put the dollar sign before the number.

The field is below. Any help would be much appreciated!

${lead.invoice1due}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Nicholas_Manojl
Nicholas_ManojlAccepted solution
Level 8
Jul 28, 2016 11:41 PM UTC

I think you're referring to "escaping", which means that you don't want the "$" to be swallowed by the Velocity engine. In this case, I don't think you need to escape the $ symbol.

But if for some reason this isn't working:

<p>Your next invoice is $${lead.invoice1due}</p>

You could try this:

#set ($d = "$")

<p>Your next invoice is $d${lead.invoice1due}</p>

4 replies

Jul 28, 2016 11:10 PM UTC

I think you can just select the field you want from the right hand tree and it will automatically have the dollar sign in from of it

Translate
Paul_Johnson
Level 4
Jul 29, 2016 3:51 PM UTC

Sorry Jamie,

What do you mean the right hand tree?

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Jul 29, 2016 8:42 PM UTC

Referring to the treeview on the right side of the Email Script Editor, where you choose which objects to pass to the script.

Translate
Nicholas_Manojl
Nicholas_ManojlAccepted solution
Level 8
Jul 28, 2016 11:41 PM UTC

I think you're referring to "escaping", which means that you don't want the "$" to be swallowed by the Velocity engine. In this case, I don't think you need to escape the $ symbol.

But if for some reason this isn't working:

<p>Your next invoice is $${lead.invoice1due}</p>

You could try this:

#set ($d = "$")

<p>Your next invoice is $d${lead.invoice1due}</p>

Translate