[Qgis-user] Autogeneration id codes

Richard McDonnell richard.mcdonnell at opw.ie
Tue May 2 09:16:33 PDT 2023


Hi Riccardo,
Have you tried, after you delete your rows, disabling editing and then enabling editing again before you add your new rows?

Also have a look at this

https://gis.stackexchange.com/questions/132346/is-there-a-way-of-auto-increment-for-the-id-column-in-qgis

Regards,

Richard.



--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://gov.ie/opw

--
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/

--
MSc GIS, FME Certified Professional

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 46 942 2409
https://https://gov.ie/opw<https://www.opw.ie>

--
Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/<https://www.opw.ie/en/disclaimer/>
From: QGIS-User <qgis-user-bounces at lists.osgeo.org> On Behalf Of Riccardo via QGIS-User
Sent: 02 May 2023 16:28
To: Riccardo via QGIS-User <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] Autogeneration id codes


Good morning to all,



first I would like to thank Bernhard Ströbl, Richard McDonnell, Andrea Giudiceandrea and Bernd Vogelgesang for suggestions related to some of my previous posts.



Now I have another problem.....



I have some tables already created that have a column with autogeneration id codes.



>From self-generation I often don't get codes that start from 1 onwards but start with other numbers.



I made some tests and I noticed that if I create a table and add 10 lines the autogeneration creates id codes from 1 to 10. If I delete these lines to empty the table when I create a new line Qgis autogenerates that with the code 11, it seems that Qgis keeps in memory the number/id code of the created elements, and keep the numbering as a fixed counter.



How can I impose a autogeneration of id codes starting from 1?



Many many thanks!



Best Regards.



Riccardo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230502/706d2f9b/attachment.htm>


More information about the QGIS-User mailing list