Monday, March 28, 2011

A Simple Rule to Prevent ‘Dear John L.’ in Emails - #DataQuality, @Salesforce

I have a thing about naming conventions and consistent data.

I often see Lead and Contact records where the First Name is something like “John L.”, even though I have added a Middle Initial field.

I personally would prefer not including a middle name at all, but it is something that is widely accepted in our industry. So, I’m doing my best to keep my users happy.

Here’s the simple rule that should effectively nip this in the bud.


It works the same for Leads and Contacts.

Yay for data quality!


You can also prevent users from entering “John T” (without a period) by changing the error condition formula to this:

   CONTAINS(FirstName, "."),
   CONTAINS(RIGHT(FirstName,2)," ")

This formula runs if either:

  1. There’s a period in the First Name field, or
  2. The second character from the end of the First Name field is a space.

Thanks @hak_a_tak for the suggestion!

1 comment:

  1. That's a great one- might have to throw it up in my org! :) I like that it cuts out the inital, but allows for names like Mary Ann, etc. In some areas it's not uncommon to use both names as a regular name.