duan Posted April 5, 2005 Share Posted April 5, 2005 Hi there; I'm importing an old, badly mad, inconsistent database from Appleworks (well it was made for Claris works but that's another story!) into filemaker and everything will map ok except for one crucial thing. In the old database the entry was simply "name" (people entered Firstname Lastname in that field) now naturally enough I want to separate them into two different fields - anyone any ideas of something I can do to get "one field" to be used to populate the two while recognising that the "SPACE" between "Firstname Lastname" is what makes the difference between the two fields? [i'm hoping for too much amn't i!] Link to comment Share on other sites More sharing options...
Maarten Witberg Posted April 5, 2005 Share Posted April 5, 2005 It can be parsed easily using a script, but what if there are middle names or double last names? Tony Joe White Griff Rhyss-Jones This script will force all double names to LastName: Code: go to record[first]loopset field["NameFirst", "LeftWords(NameField;1)"]set field["NameLast", "RightWords(NameField;WordCount(NameField)-1)"]go to record [exit after last, next]end loop kjoe Link to comment Share on other sites More sharing options...
FileMakin' Tom Posted April 6, 2005 Share Posted April 6, 2005 Hi Duan . . . I have an old parsing routine which handles this uniquely, including allowing for names with Mc, Von, Abu, Al, O', Mac prefixes as well as hyphenated names. A bit complex, but works well for this purpose. Email me at fmguru@tampabay.rr.com and request name parsing file (v5.5) and I will email a copy to you. You can easily convert it to the dreaded v7 format. Be well . . . Tom Link to comment Share on other sites More sharing options...
Maarten Witberg Posted April 6, 2005 Share Posted April 6, 2005 Hi Tom, I'm having a deja vu about this! Will you post your Parsing File to the samples section, I'm guessing many people will be very grateful. kjoe Link to comment Share on other sites More sharing options...
Officer Ron Posted April 8, 2005 Share Posted April 8, 2005 you could break the field in two by creating two calc fields. Make a field called Name_Firstname_Calc. Use the calculation Leftwords(Name,1). Make another field Name_Lastname_Calc. Use the calulation RightWwords(Name,1). Then you can Make two Text fields FirstName and LastName. Create a script. Loop Copy (Name_Firstname_Calc) Paste (FirstName) Copy (Name_Lastname_Calc) Paste (LastName) Go to Record/Request/Page[Next;Exit after last] End Loop Set the records from your first record in your database, then execute the script. You will now have all of your first names and last names broken into seperate fields and you can then have users enter first and last names in seperate fields from that point on. Link to comment Share on other sites More sharing options...
FileMakin' Tom Posted April 8, 2005 Share Posted April 8, 2005 I have uploaded the parsing file to the forum. Tom Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.