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
Solved! Go to Solution.
Looks like you didn't check for empty.
#if($fname.equals("Unknown") || $fname.contains("?") || $fname.isEmpty())