Our data is a mess and some of our first name fields contain numbers. Is there a way to use velocity script to weed those users out. I am currently doing it this way, but I didn't know if there was an easier way.
#if ( $lead.FirstName.contains("1") && $lead.FirstName.contains("2") && $lead.FirstName.contains("3") && $lead.FirstName.contains("4") && $lead.FirstName.contains("5") && $lead.FirstName.contains("6") && $lead.FirstName.contains("7") && $lead.FirstName.contains("8") && $lead.FirstName.contains("9") && $lead.FirstName.contains("0"))
Hi there,
#else
Hi ${lead.FirstName},
#end
I messed it up. It's actually:
#if ( $lead.FirstName.contains("1") || $lead.FirstName.contains("2") || $lead.FirstName.contains(".3) || $lead.FirstName.contains("4") || $lead.FirstName.contains("5") || $lead.FirstName.contains("6") || $lead.FirstName.contains("7") ||$lead.FirstName.contains("8") || $lead.FirstName.contains("9") && $lead.FirstName.contains("0") )
Email Friend,
#else
${lead.FirstName},
#end
#if( $lead.FirstName.matches(".*\d+.*") )
Email Friend,
#else
${lead.FirstName},
#end