I have two shp layers with different numbers of fields and slightly different attributes of those field, like the column name or field length. I arranged them so they are in the same order and now want to copy points from the Layer Georef_FO to the Layer Georef_FO_2. Screenshot attached.

I put both layers in edit mode while in the attribute table window and then just copied all records from Georef_FO and pasted them into Georef_FO_2. I get all the points on the map but no information in the Name Field, just NULL Values. (the "Name" colums is right now the only column in Georef_FO containing any information and I want this to be copied into the layer "Georef_FO_2".

Restarting QGIS doesn´t make the values appear in Georef_FO_2. There are still only NULL Values.

I couldnt find out how to change field length of a field in an existing layer, so if that may be helpful please explain how to do that.

enter image description here

  • my original shp file has fewer columns(47) than the second one (54) so i added the columns but they are in red and its giving me an error – Lenon Msosa Apr 9 '19 at 11:05

In order to copy/paste attributes, the field names must match so that QGIS knows where to correctly copy the attributes to. From the Processing Toolbox (using Processing plugin version 2.10.2), there is a tool called "Refactor fields".

This allows you to change the field structure of your shapefile such as name, length etc:

Refactor fields

So if you want the name attributes to be copied successfully, make sure both shapefiles have a common field name.

Hope this helps!

  • 1
    Thanks so much! It worked, just got confused in the first try and changed field names in both columns "name" and "Expression" inside the refactor field toolbox which produced an error. You only have to change it in the "name" column otherwise you get an error message. – Taya Oct 23 '15 at 8:11
  • @Taya - Awesome, glad you got it working! Thanks for mentioning the error, I only used this a couple of times before so good to know :) – Joseph Oct 23 '15 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.