Tuesday, August 2, 2011

{Update} Val Rule to Prevent ‘Dear John L.’ has a Glitch – Fixed! #DataQuality @Salesforce

A few months ago, I shared a validation rule for Contacts to prevent sending emails with “Dear John L.”

My data quality check ensured that users didn’t enter a middle name in the first name field.

But, when I was doing some updates with the Excel Connector yesterday, I realized that my validation rule had a glitch.

It was correctly preventing middle names in the first name field, but it was also throwing the same error when they entered a name that happened to be abbreviated (such as “A. R.”). Or in this case, I was getting the error when I attempted to update the records en masse.

2011-08-01_144033

So, I’ve updated my rule to allow abbreviated first names by adding a function to my formula to cause it to fire only when the length of the field is greater than 5 characters.

This accounts for names where a space exists between the acronym or vice versa.

Here is the original error condition formula:

2011-08-01_144116

And here’s the updated one:

2011-08-01_144317

If you have a more effective way to accomplish this, please do share in the comments!

Related Posts

Jenna Baze is a rather geeky girl with average social skills and an affinity for: Google Apps, Salesforce.com, Pinterest, natural light photography and finding creative ways to avoid doing dishes (which includes updating a handful of blogs).
Email:
rathergeeky@gmail.com
Twitter: @RatherGeeky
Facebook: Rather Geeky Tips