• mwremedy
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hello,

 

I am a VERY new salesforce user, and unfortunately am likely trying to tackle too much, but basically, I have a custom field that I want to add a validation rule for.  I have a 9 digit alphanumeric field that has a very specific set of validations I need performed.  I would GREATLY appreciate the help.

 

The number is 2 letters, 6 numbers, and 1 checksum digits. The 2nd letter is the initial of the contacts last name and the 7th is calculated as: add 1st, 3rd, and 5th digits, then add 2nd, 4th, and 6th digits and multiply by 2.  Add those 2 numbers together. The last digit of this last sum shold be the 7th digit.

 

I know this is likely crazy, but I would like to verify the following:

1. The field is exactly 9 digits, and the first two are letters, and the last 7 are numbers.

2. The 2nd letter matches the first letter of the contacts last name

3. the 7th digit is equal to last digit (ie. RIGHT(x,1) of ( (1st+3rd+5th) + ((2nd+4th+6th)*2) ). 

 

THANK YOU VERY MUCH FOR YOUR HELP!!