SteveB Posted June 1, 2006 Posted June 1, 2006 Has anyone written or seen custom CFs to extract the first and last names from a field? Simple algorithms don't do the trick...they're easy to write but won't work in cases such as 'Ann-Marie Smith' or 'John Mark Osborne' or hyphenated last names such as 'Robert Smith-Jones', and the cases of names with middle initials and names with a suffix such as 'Jr.' Steve
Razumovsky Posted June 2, 2006 Posted June 2, 2006 What are all the possible scenarios? Ann-Marie Smith F: Ann-Marie L: Smith John Mark Osborne F: John L: Osborne Robert Smith-Jones F: Robert L:Smith-Jones Sammy Davis Jr (Sr, II, III) F: Sammy L: Davis I think you could ignore middle initials and just approach it from a left word (first) right word(last) perspective once the field had the suffixes substituted out. If the above four are the only forms the data comes in, then it would be just a matter of recognizing a hyphen as joining two words. There must be more name types that I am not thinking of though... -Raz
SteveB Posted June 2, 2006 Author Posted June 2, 2006 There are probably other combinations that need to be handled: A.F. Jones: 'A.F.' A. F. Jones: 'A.' Albert Frank-Thomas Jones: 'Albert' A. Jeffrey Jones (beats me): 'Jeffrey'? Filemaker considers a '-' as a field separator, so I would substitute dash with '^' or some other uncommon character. The rules are trickier than the function. Raz: I'm a ex-Brooklyn boy...where do you live? Steve
Razumovsky Posted June 2, 2006 Posted June 2, 2006 Yes, it is all about the rules. I might say: A.F. Jones: F: A. L:Jones A. F. Jones: F: A. L:Jones Albert Frank-Thomas Jones: F:Albert L:Jones A. Jeffrey Jones (beats me): F:Jeffery L:me) Hmmm, would have to adjust for the last one. I was thinking about those, but then it becomes a matter of what exactly a 'First Name' is in any particular situation. In a strictly legal sense, Would 'A.F.' be allowed as a first name? I would think that if you wanted to get that specific, you would have to break it out from Given name as a separate field. Unless you are suggesting that the standard is include initials as first name as long as there are no spaces. I have no idea. Maybe there is a style book that covers this? I'm in Williamsburg - watching the city get washed away. Was actually just thinking about vegas. Much work out there? Got any FM8 Slot templates? Card counting FM mobile solutions?
John Mark Osborne Posted June 2, 2006 Posted June 2, 2006 The FileMaker KnowledgeBase has a great article on parsing names in almost every scenario. The article was written for FileMaker 6 but will work fine for FileMaker 7 or 8. http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=3638&p_created=1115172740&p_sid=Rc36_39i&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9MTA1NCZwX3Byb2RzPTAmcF9jYXRzPSZwX3B2PSZwX2N2PSZwX3NlYXJjaF90eXBlPWFuc3dlcnMuc2VhcmNoX25sJnBfcGFnZT0xJnBfc2VhcmNoX3RleHQ9bmFtZQ**&p_li=&p_topview=1
Razumovsky Posted June 2, 2006 Posted June 2, 2006 Wow, Cheers to not having to come up with that one. Thanks fo the link!
SteveB Posted June 2, 2006 Author Posted June 2, 2006 Thanks, John. The Filemaker Knowledge Base is a good starting point. Raz: Slot Template (as in Slot Machine Templete?): I lived in Midwood Section, and East New York, also in Manhattan (Gramercy Park). Don't know about the job market, but I know I could never move back East...love the weather except when it hits 110. Steve
Recommended Posts
This topic is 6747 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now