Importing one Layer Field into another Layer Field...?

6680
5
02-15-2012 07:12 AM
CliveCartwright
Occasional Contributor
I've got two Layers (.shp) files that share common data on some attribute fields. One layer file contains an attribute field that the other doesn't.

I've prepared a blank field with the exact same name as the field I wish to copy over/join, but I'm struggling to import the data into this empty field using ArcGIS. I can do it using Excel, but it's clumsy and time consuming.

I can see from similar posts on the forum that you can do this within Arc, but the instructions assume a user level of knowledge above me. :[

Is there anyone who can talk me through this potentially simple process...?

Any help will be much appreciated.
Tags (2)
0 Kudos
5 Replies
AlexeyTereshenkov
Regular Contributor III
Hi Clive,

Not to worry 🙂

You can read the essentials of the data joining (as it is called) in here:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Essentials_of_joining_tables/005s00000...

What you basically need to do is:
1) Right-click the layer in table of contents in ArcMap (the shapefile you've added) in which you want to transfer some data to and choose Join and Relates > Join. Here you can again refer to the page link I've provided you with, it will explain the details of the window's options.

2) Choose the field which will be used as the "common field" so ArcMap can understand what rows in the shapefile A match the rows in shapefile B. It can be unique parcel ID numbers or something else. And then OK.

3) Now you have your data temporarily transferred from the shapefile B to the shapefile A. You can either export the shapefile A (which has its own attributes as well as the attributes from the shapefile B) or right-click on the newly created field (which you mentioned in the post) and choose Field Calculator. Here you can choose what joined field values do you want to copy here.

How to use Field Calculator (just in case you are not familiar with this): http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Making_simple_field_calculations/005s0...

How to export data: Right-click the layer that contains the features you want to export, point to Data > Export Data.

4) After you've done this, you can right-click the layer in table of contents in ArcMap (the shapefile you've added) in which you want to transfer some data to and choose Join and Relates > Remove Join(s) since you do not need those joined fields anymore.

Hope it is clear enough. Refer to the help pages if lost. 🙂

If you have some time for training, consider going through tutorials that are relevant to your workflows:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ArcGIS_tutorials/00v20000000t000000/
CliveCartwright
Occasional Contributor
This looks great. I'll follow this advice as soon as I return to the office.

Looks like you've saved me an awful lot of time. 🙂

Many thanks,

Clive.
0 Kudos
JamalNUMAN
Legendary Contributor
Hi Clive,

Not to worry 🙂

You can read the essentials of the data joining (as it is called) in here:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Essentials_of_joining_tables/005s00000...

What you basically need to do is:
1) Right-click the layer in table of contents in ArcMap (the shapefile you've added) in which you want to transfer some data to and choose Join and Relates > Join. Here you can again refer to the page link I've provided you with, it will explain the details of the window's options.

2) Choose the field which will be used as the "common field" so ArcMap can understand what rows in the shapefile A match the rows in shapefile B. It can be unique parcel ID numbers or something else. And then OK.

3) Now you have your data temporarily transferred from the shapefile B to the shapefile A. You can either export the shapefile A (which has its own attributes as well as the attributes from the shapefile B) or right-click on the newly created field (which you mentioned in the post) and choose Field Calculator. Here you can choose what joined field values do you want to copy here.

How to use Field Calculator (just in case you are not familiar with this): http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Making_simple_field_calculations/005s0...

How to export data: Right-click the layer that contains the features you want to export, point to Data > Export Data.

4) After you've done this, you can right-click the layer in table of contents in ArcMap (the shapefile you've added) in which you want to transfer some data to and choose Join and Relates > Remove Join(s) since you do not need those joined fields anymore.

Hope it is clear enough. Refer to the help pages if lost. 🙂

If you have some time for training, consider going through tutorials that are relevant to your workflows:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ArcGIS_tutorials/00v20000000t000000/


Hi Alexey,

I�??m not sure if there is a shorter way just to import the fields (only the names without the data) of a layer into another!

Is there a command like �??import scheme�?�?

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
AlexeyTereshenkov
Regular Contributor III
Jamal, run the Truncate Table tool on a copy of your feature class. This will wipe out all the rows and leave the columns (what you call schema) left. Another really quick and dirty way of doing this is to use the Feature class To Feature class GP tool and specifying the expression which would return no features. The output feature class created will contain no rows and you can use it.

You are probably aware of the Import button available to you when you create a feature class in a geodatabase and define its properties.

The Create Feature Class GP tool also makes it available for you to specify the feature class to use as a template regarding the fields.
0 Kudos
JamalNUMAN
Legendary Contributor
Jamal, run the Truncate Table tool on a copy of your feature class. This will wipe out all the rows and leave the columns (what you call schema) left. Another really quick and dirty way of doing this is to use the Feature class To Feature class GP tool and specifying the expression which would return no features. The output feature class created will contain no rows and you can use it.

You are probably aware of the Import button available to you when you create a feature class in a geodatabase and define its properties.

The Create Feature Class GP tool also makes it available for you to specify the feature class to use as a template regarding the fields.


Many thanks Alexey for the alternatives you offered. They are really helpful.

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos