May 11, 200124 yr Newbies I have a field called "Name" which contains, as you might imagine, names. It unfortunately holds both first and last names, all of varying character lengths and separated by a space. I am trying to write a script that will separate them into two fields, "Firstname" and "Lastname", and remove the space. I anticipate using the "Set Field" script step but don't know how to go about writing the calculation. Does anyone have some advise on this?
May 11, 200124 yr Create a field called "First Name". Find all records, and use the Replace command to replace with calculation, the calculation being: Leftwords(Name,1) The same will be done for "Last Name". Replace, the calculation being: Rightwords(Name,1)
May 11, 200124 yr Beware of situations where the name field has more than a single first name and single last name. Eg: Ludwig Von Beethoven George W. Bush Henry Ford II etc. Create a calculated field called NameWordCount and set it equal to WordCount(Name). Then do a search for NameWordCount>2. This will give you a found set of problem records that you will have to handle differently.
Create an account or sign in to comment