Feature request #10295
Add auto increment field for non database formats
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Vectors | ||
Pull Request or Patch supplied: | No | Resolution: | |
Easy fix?: | No | Copied to github as #: | 18721 |
Description
It would be usefull to add a QGIS Field edittype called "Serial" and implementing auto-incrementation for non-database formats :
- in the form, make the field visible but not editable
- for new object, get the next number
QGIS could store the current serial state in the project file and update it during the commit, and manage multiple inserts and errors on insert
History
#1 Updated by gcarrillo - about 8 years ago
The AutoFields plugin [1] helps you achieve almost all you mentioned, except making the field non-editable.
Watch this video of an automatic id field for Shapefiles (and any other editable vector layer in QGIS).
Please give it a try. If it works for you, we could close this issue.
--
[1] http://plugins.qgis.org/plugins/AutoFields/
[2] https://vimeo.com/178923847
#2 Updated by Giovanni Manghi over 7 years ago
- Easy fix? set to No
#3 Updated by Paolo Cavallini over 6 years ago
- Description updated (diff)
Sounds good. IMHO this should be promoted to a core function, and in any case the plugin should be ported to QGIS 3 before closing this ticket.
#4 Updated by Giovanni Manghi over 6 years ago
Paolo Cavallini wrote:
Sounds good. IMHO this should be promoted to a core function, and in any case the plugin should be ported to QGIS 3 before closing this ticket.
creating a gpkg in qgis adds an autoincrementing fid field.