Jump to content
Server Maintenance This Week. ×

Combining two fields

This topic is 7822 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Currently my database has a field (number) for phone number area code and a second field for the actual phone number. I need to combine the two fields so that the entire phone number appears in one field only. Can anyone give me some hints? I intend to import data into another database for a specific user who has this requirement. Should I do this with a script or calculation? I am clueless.

Link to comment
Share on other sites

You're only doing this so you can export as a single field? A calculation field should be sufficient.

Create a new calculation field, and make the definition the following

AreaCodeField & "-" & PhoneNumberField

This will make your new field equal to the area code, then a dash, then the rest of the number. The "&" connects the parts, so you can see how you can use this to use other formatting options (if you wanted brackets for example).

Link to comment
Share on other sites

Hi Mary,

There are a couple of ways to approach this. The simplest would be to add a field through your Field Definitions, such as WholePhone, type calculation. When the calculation box appears, double-click your AreaCode field, then click the & sign, then add a space or dash between the "", then another &, then double click your PhoneNumber field. Set calculation result to TEXT and go to Storage options and click the box that says "Do not store."

So your calculation formulae would be something like:

AreaCode & "-" & PhoneNumber

Then find all the records you want to export, and export just this calculation field. You could then also use this calculation field for 'displaying' your complete phone numbers on reports, etc. smile.gif

Link to comment
Share on other sites

This topic is 7822 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.