[SOLVED] Help form a list of last name formats

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

[SOLVED] Help form a list of last name formats

Post by dallasx »

Ok, in my never ending quest to control data as much as I can, I need to take in certain consideration certain types of last names.

Here is what I have so far. Can yall help me with others?
  • Mc________
  • Mac________
  • O'________
  • D'________
  • L'________
  • ________-________ (maiden name tacked on the man's last name)
Last edited by dallasx on Tue Dec 27, 2005 3:25 pm, edited 1 time in total.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Can I ask why you would need to know this?

If you want to control name entry to an unrealistic extent just allow unlimited capital letters, one apostrophe and unlimited hyphens. No numbers, just letters, and a max entry of something suitable, 30 should cover it.

Being able to decipher what type of a Surname someone has shouldn't be necessary.

When I am validating surnames I just make sure there are no numbers (sometimes I don't even bother with that), and limit it to 30 characters.
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Post by dallasx »

My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

dallasx wrote:My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.
Why not have your script/program correct it for you?
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Post by dallasx »

foobar wrote:
dallasx wrote:My internal and external customers think that text is formatted magically somehow. This just saves me time trying to correct it later.
Why not have your script/program correct it for you?
That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

dallasx wrote: That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.
Why bother? Just capitalize the first letter of every word in their surname if there aren't any capitals already, and you're done. It's your users' problem to try to enter their surname with the correct capitalization, realy.

Also, relying on surname formats may fail with non-English surnames, causing you more problems. Take, for instance, the name Maciejkowski. A perfectly normal Polish surname, which would be converted into MacIejkowski as per your script.
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Post by dallasx »

foobar wrote:
dallasx wrote: That is what I am going to do. I just need a little help trying to figure out if there are any more of the sur names formats (i guess you would call it that) than the ones listed above.
Why bother? Just capitalize the first letter of every word in their surname if there aren't any capitals already, and you're done. It's your users' problem to try to enter their surname with the correct capitalization, realy.

Also, relying on surname formats may fail with non-English surnames, causing you more problems. Take, for instance, the name Maciejkowski. A perfectly normal Polish surname, which would be converted into MacIejkowski as per your script.
True, point taken.

Yeah, the heck with it :)
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

dallasx wrote: True, point taken.

Yeah, the heck with it :)
That's the spirit! Let the problem solve itself. :) After all, if someone refuses to type their name properly, who cares? They're only hurting themselves...
User avatar
dallasx
Forum Contributor
Posts: 106
Joined: Thu Oct 20, 2005 4:55 pm
Location: California

Post by dallasx »

foobar wrote:
dallasx wrote: True, point taken.

Yeah, the heck with it :)
That's the spirit! Let the problem solve itself. :) After all, if someone refuses to type their name properly, who cares? They're only hurting themselves...
Well, yes and no. I need contact names, addresses and phone numbers to be uniform. That's why I was going to try to format the name the way I want it but oh well. I'll keep my current system of exploding a string, stripping the case and upper casing the first and last name.
Post Reply