QUESTION:
Can I use DemandTools to find records with middle initials in the first name field and then remove them?
ANSWER:
Yes. This is a tricky one, but it can be done in MassImpact using the AllTextBeforeChar formula.
Instructions begin at the top of Screen 2 in MassImpact:
- Using Conditions, identify the contacts that have a space in the firstname field:
- In the where clause specify where firstname contains (a space).
- You will literally type a space in the "value" field and it will look for a space (it will appear blank, but finds those with a space).
- Ideally, we only want to identify the records that have a middle initial vs. just any first name with a space in it (i.e. Mary Ann), but there is no way to do that 100% so, REVIEW THE RESULTS CAREFULLY BEFORE PROCESSING, unchecking any records that should not be updated.
- Adding a condition where firstname contains . (period) will limit the results some (e.g. Mary B. vs. Mary Ann), but this will only be effective for the records where the middle initial is followed by a period.
- A first pass could be run with this extra condition, then remove it and run again, this time JUST looking for the space.
NOTE: The condition where firstname contains . should be a separate condition. We want the conditions and'd together so it reads, firstname contains space AND first name contains period (vs. separating with a comma and it translating to space or period).
In the "Field Values on Record to Change" section:
- Select First Name as the field to update
- Choose the Formula Tab
- Use the "AllTextBeforeChar" formula to return all characters AFTER the space:
- AllTextBeforeChar( {firstname} , " ")
- This will also split out any 2+ word first names and just return the 1st part of the name so you will have to review carefully.
- Mary B. - > Mary
- Mary Ann -> Mary
- E J -> E
- Mary Wilson -> Mary
- Use the "AllTextBeforeChar" formula to return all characters AFTER the space: