To Copy a Row From an Attribute Table to Another

532
8
Jump to solution
04-17-2024 08:28 PM
Labels (1)
DavidGray1
New Contributor III

Hello Community;  I have asked this before with no response. I understand that it is possible to copy a row from one attribute table to another. However, when using the Copy command at the top of the table and with the desired row highlighted, nothing is available. It say it copied it to the clipboard. OK, now what?

I find a page talking about copying rows where the summary says "Copies the rows of a table to a different table".  Here is the link:

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/copy-rows.htm

Is this saying that only all rows can be copied? I want to copy just one row to another attribute table for a feature class. To be able to do this would save a bunch of time instead of manually creating the feature all over again.

I upgraded to and am currently using Pro 3.2 with the latest patch applied.

Help!   Dave

0 Kudos
1 Solution

Accepted Solutions
DavidGray1
New Contributor III

Hi Dale;   I gave it a go with success. And ran it several times on objects that I was getting confounded before. Using Append seems to be the more simple and elegant solution. Real simple in my case as the field names are the same in both source and targets.

I still remain puzzled why the ribbon based Attributes copy and paste technique would work fine initially and then stop working with all procedures remaining the same. Oh, well, one of those quirks that Arc Pro can be known for.   Thanks much!  I'll mark it as solved and hope it stays that way!

View solution in original post

0 Kudos
8 Replies
Dale_Honeycutt
Occasional Contributor II

Copy Rows will copy the selected rows of the input table or layers to a new table.  If there are no selected records in the input table/layer, then all rows will be copied to the new table.  

Geoprocessing tools that honor the selected set of records as input (like Copy Rows) will have the "Use the selected records:" toggle just after the input, as shown below.

Dale_Honeycutt_0-1713420652637.png

If you're copying features, use the Copy Features tool

If you want to select a row from one table/feature layer then append it to an existing table or feature class, use the Append tool.  It's often the case that the attributes of the  input rows are being appended to an existing table/feature class don't match up.  For example, the input might have a field named "ClassID" and the table you're appending to (the Target dataset) has a field name "ClassName" and you want the values of ClassID to be put into the ClassName field.  Because this is a common use case, Append has a Field Map control that allows you to do all sorts of stuff to match up input and target fields. 

0 Kudos
DavidGray1
New Contributor III

Hi Dale; Thanks for the reply and the suggestions. In the Copy Rows menu that you showed above, I can specify the source feature class and the selected row in the first box called Input Rows. However, in the second box all I can find to be able to pick and specify is an existing Table in the file geodatabase. That Table is not included in the working project I am trying to perform this function in. Plus, that doesn't allow me to copy that selected feature object (polyline) into an existing attribute table for objects in a layer in the working map and project I am in.

In looking at and experimenting with the Append Tool, I learned about the Transfer Attributes and Field Mapping/Editor Settings menu boxes with the Fields tab. When specifying the Target and the Source boxes (with the desired row selected) and clicking OK and running the Transfer Attributes tool.......nothing happens.   In this example the attribute field names are identical. 

I am new to Pro 3.2, but have operated in Pro 2.9.5 for quite awhile. Even with that though, I have learned some new things in Pro - which of course never ends. That is a good thing and part of the fun. But I am not yet getting to where I need to be with copying a polyline from one attribute table to another within the same project.

Dave

0 Kudos
DavidGray1
New Contributor III

So I explored and attempted the "Copy Features" option. It is so close, but doesn't allow you to copy to an existing Feature Layer's Attribute Table. It apparently wants to create a new table and copy the selection into that new table.    Dave

0 Kudos
Dale_Honeycutt
Occasional Contributor II

To copy into an existing table, use the geoprocessing Append tool, NOT copy features. Append has its own Field Map control in its dialog, separate from Transfer Attributes in the project's Editor tab.

Dale_Honeycutt_0-1713657608182.png

Clicking Edit on the field map brings up Field Properties where most of the action is.

Dale_Honeycutt_1-1713657649264.png

The input to Append can be a layer in your map with a selected set of records.  Those selected records are what are appended into the target dataset.

It seems like your mixing the Edit/Table ribbons in the project with running the geoprocessing tool.  I don't use those ribbon tools much -- I think I tried the transfer attributes tool once and got confused 🤔 so I went back to using Append.  

Append only works with similar geometry.  You can append point features into another point feature class, but not lines/polys.  You can append stand-alone table records into another stand-alone table. Are you trying to append a record from a stand-alone table (a table w/o a shape column) to a feature class?

 

0 Kudos
DavidGray1
New Contributor III

Hi Dale;   I gave it a go with success. And ran it several times on objects that I was getting confounded before. Using Append seems to be the more simple and elegant solution. Real simple in my case as the field names are the same in both source and targets.

I still remain puzzled why the ribbon based Attributes copy and paste technique would work fine initially and then stop working with all procedures remaining the same. Oh, well, one of those quirks that Arc Pro can be known for.   Thanks much!  I'll mark it as solved and hope it stays that way!

0 Kudos
DavidGray1
New Contributor III

Hi Dale;   After I posted the above reply, I was searching around for similar posts and found this possible solution:

https://community.esri.com/t5/arcgis-pro-questions/copy-a-row-in-a-gdb-table-to-same-gdb-table/m-p/1...

It worked!    But, on a second try with another and longer polyline object, when pasting attributes, it would only paste the Name Field and failed to paste the Shape_Length Field. Besides Object_ID, these are the only two fields. So is there a limit to how long, i.e., how many vertices the polyline may contain, to this capability?

          Dave

0 Kudos
DavidGray1
New Contributor III

An update. Every time I try this technique, even with polylines shorter than the initial one that did work, I can get none of them to work now. It comes up with the same problem of not copying the values for the shape_length, but successfully copying the polyline value in the Name field. So, why would this technique work the first time and then quit working at all subsequent attempts?

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

It's not a complete table solution, but you could always select--> copy-->paste special on the map. This will copy the record into the desired file and keep attributes and geometry.

AlfredBaldenweck_0-1713967786544.png

(You can also use this to turn polygons into lines)

No good solution for table-tables, though

0 Kudos