Modifying field values using velocity script?
Hello Community!
I am reviewing how to use Velocity Script for modifying tokens, content in emails, etc. I came across a script that looks like it might be useful in solving a current problem.
We are using a token {{Lead.Sub Partner}} to identify various Sub Partner classes, i.e. Presidential, Chairman's Club, Select, etc.
The problem is that when some of our contacts were imported into Marketo from an excel document, the apostrophe got transposed into some unnecessary characters: Marriott - Chairman’s Club.
Would it be possible to use the script below to change this Sub Partner name to this? Marriott - Chairman's Club?
#set( $lead.SubPartner )
#if( $lead.SubPartner contains("Marriott - Chairman’s Club") )
Marriott - Chairman's Club
#end
Or am I way off here?
Thank you much,
LK