0

Uniform phone # field

I have imported a lot of data into my data base from spreed sheets not realizing all the phone # are not formatted the same.

Is there a way to reformatt the data that is already in the data base to a single formatt like this (###-###-####)

I'm not very good with how to write code.

Joe

2 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    If you are using the Mac or iPad app, you can make two passes with "Update multiple records" under the "Table" menu. On the first pass, you would choose "Assign calculated value" for the phone field you want to update. Enter this formula...

     

    replacex(Phone, "\D", "g", "")

     

    That will remove any formatting and leave just the number. On the second pass, choose "Assign calculated value" again and enter this...

     

    substr(Phone, 0, 3) + "-" + substr(Phone, 3, 3) + "-" + substr(Phone, 6)

     

    That will format the numbers the way you want.

    • Joe_Cirillo
    • 4 yrs ago
    • Reported - view

    Thanks Sean, that worked great.

    You saved me a lot of time and effort.

    Joe

Content aside

  • 4 yrs agoLast active
  • 2Replies
  • 898Views