Hi!
Do you really need the ID field in the shapefile? If not you can drop it, hide 
it or ignore it and it works anyway. If you need a counter as primary key 
consider using another data provider suggested by Andreas.

Karl-Magnus Jönsson

Från: Qgis-user [mailto:[email protected]] För Neumann, Andreas
Skickat: den 31 maj 2016 14:04
Till: Simon Muirhead
Kopia: [email protected]
Ämne: Re: [Qgis-user] Auto-fill id in attribute table when creating a feature


Hi Simon,

It is a bit data provider dependent. For many data providers (e.g. Postgis, 
SpatiaLite, Geopackage) you just don't fill in this value (or better set the 
edit widget to "read only") - provided that the database has a sequence defined 
for the primary key column. The values are filled in when saving the data. In 
2.16 there is a new mode for PostgreSQL to immediately get the id value 
(experimental).

What data format are you using?

Greetings,

Andreas

On 2016-05-31 13:43, Simon Muirhead wrote:

Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new 
feature in a shape file, QGIS asks to fill in the id in the attribute table for 
every feature created. Is there anyway to have this done automatically like 
ARCGiS does?

Regards, Simon Muirhead
Written from my Nexus 6P so don't expect Tolstoy.

_______________________________________________
Qgis-user mailing list
[email protected]<mailto:[email protected]>
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user



_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to