Calculated Field with Letters from First and Last Name
Hi All, I am trying to do a calculated field which will work out someone's username by taking the first 6 letters of their Last Name and the first letter of their First Name. Does anyone have any ideas how I can do this? Many thanks
November 15th, 2011 8:42am

There are a family of string functions, like LEFT, RIGHT, MIDSTR, SUBSTR, LEN, etc (You can lookup the exact references on the Bing.) Given that the names are ALWAYS in this format: [First Name]{Space}[Last Name] (ex. Steve Clark) Follow this algorithm: 1. Locate the character of the space. (call it nPos) 2. Extract nPos+1 to the end 3. Extract the first char of the [first name]. Concatentate them all together. It is possible to achieve this in the calculated field box, but for more control, do it in an SPD Workflow. The hard part is when you have a name like Victoria de Borga, or Chaulky O'Brien. What happens if the last name is less than 6 chars, too. Steve Clark, MCTS |
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2011 9:39am

I was thinking if the last name was less than 6 characters then it would just be their full lastname e.g. smith so the username for john smith would be smithj same applies for the other names you mentioned i guess.
November 15th, 2011 11:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics