AnsweredAssumed Answered

Velocity concatenate not working with comma?

Question asked by 1fbb8c37c6ac8ce1fdab50469300809d1ef1a1d6 on Feb 24, 2017
Latest reply on Feb 24, 2017 by Sanford Whiteman

Hello Marketo users,

 

I am trying out my second velocity script. Somehow commas are breaking the script. $greetll is not printing correctly in the email, and the part is breaking is ${greeting}, what I see from the else part is ", we love local". Can you someone help? thanks!

 

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

#if($fname.equals("Unknown")||$fname.contains("?"))

It's true, we love local

#else

#set($greeting = $display.capitalize($fname))

#set($comma = ",")

#set($lovelocal = " we love local")

#set($greetll = "${greeting}$comma$lovelocal")

$greetll

#end

Outcomes