Re: Smart List - finding a space in First Name field

Anonymous
Not applicable

Smart List - finding a space in First Name field

Folks - is there a way to build a Smart List that finds a space in the First Name field? I have thousands of records where the First Name was duplicated due to a system issue and wondering if there is a mass update option. Otherwise, looks like I will have to import and clean it up in excel.

Thanks.
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Smart List - finding a space in First Name field

Excel will require a significant manual work.

SOAP API and few lines of JavaScript or jQuery can do that for you if you haev access to web developers.

The process would consist of:
1. SOAP getMultipleLeads to retrieve the lead records from the database. 

2. Code fragment of JavaScript to find the white space and updaet the database

var mystring = (get the attribute value from the SOAP API response)
document.getElementById('your_first_name_field').value;
 
function hasWhiteSpace(s) {
  return s.indexOf(' ') >= 0;
  // remove the whitespace
  // use SOAP syncLead to update
}

or jQuery

if !(your_string.indexOf(' ') === -1)
{
  // remove the whitespace
  // use SOAP syncLead to update
}