Jump to content
Salesforce and other SMB Solutions are coming soon. ×

importing file: need to separate firstname, lastna


Recommended Posts

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

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:



go to record[first]


set field["NameFirst", "LeftWords(NameField;1)"]

set field["NameLast", "RightWords(NameField;WordCount(NameField)-1)"]

go to record [exit after last, next]

end loop





Link to comment
Share on other sites

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 smile.gif

Link to comment
Share on other sites

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.






Link to comment
Share on other sites

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.


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


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

Terms of Use