AnsweredAssumed Answered

Extra Space in Email Script

Question asked by Chelsey Davis on Jun 5, 2018
Latest reply on Jun 5, 2018 by Sanford Whiteman

Hello,

 

I have an extra space when I use my email script for changing an all-caps first name to sentence case.

 

Here's the script:

 

#set($name = ${lead.FirstName})

#if( !$name.isEmpty() )

${name.substring(0,1).toUpperCase()}${name.substring(1).toLowerCase()} 

#end

 

And when I use it in my email, it always includes a space before the comma. (example: Hi Chelsey ,)

 

Does anyone have any ideas as to what I need to change?

 

Thanks!

Chelsey

---

Outcomes