Newbies RjC Posted July 23, 2009 Newbies Posted July 23, 2009 I imported over 16k records from an Excel spreadsheet into Filemaker 10. In Excel, the phone numbers formated as (222) 222-2222. After import, I noticed all the phone numbers are now one long string (2222222222). Is there some way to reformat existing phone numbers? The phone field is currently set as text. Any help would be appreciated. thanks.
Søren Dyhr Posted July 23, 2009 Posted July 23, 2009 Investigate this: http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000799 --sd
Lee Smith Posted July 23, 2009 Posted July 23, 2009 (edited) Hi RJC, and welcome to the forum. You can set up the field with the Auto Enter calculation that is shown in the Linked File. You will also need to deal with the existing data. I suggest that you use a loop script to modify your field. I used the calculation as shown in John Mark Osborne's file in the following script. Go to Layout [ “YourPhoneNoField” ] Go to Record/Request/Page [ First ] Loop Set Field [ AlphaButtons::Phone; Let( @NumbersOnly = Filter(AlphaButtons::Phone; "0123456789"); "(" & Left(@NumbersOnly; 3) & ") " & Middle(@NumbersOnly; 4; 3) & "-" & Right(@NumbersOnly; 4) ) ] Go to Record/Request/Page [ Next; Exit after last ] End Loop HTH Lee Edited July 23, 2009 by Guest
Recommended Posts
This topic is 5672 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