<div dir="ltr"><div><div><div><div><div>Hi Paolo<br><br></div>+1 for a QGIS Field edittype called "Serial" and implementing auto-incrementation for non-database formats :<br><br></div>* in the form, make the field visible but not editable<br>
</div>* for new object, get the next number<br><br></div>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<br><br></div>Michael<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-17 11:02 GMT+02:00 Paolo Cavallini <span dir="ltr"><<a href="mailto:cavallini@faunalia.it" target="_blank">cavallini@faunalia.it</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Il 17/05/2014 00:38, mmekuria ha scritto:<br>
> I am not sure what you mean, Paulo. But there is already the Feature Id<br>
> (Object Id in ArcGIS) in QgsFeature. Do you mean having that a mandatory<br>
> field that gets populated every time a feature is created within a<br>
> shapefile?<br>
<br>
Almost: I mean let the user define a field as SERIAL<br>
<a href="http://www.postgresql.org/docs/9.3/static/datatype-numeric.html" target="_blank">http://www.postgresql.org/docs/9.3/static/datatype-numeric.html</a><br>
also for non-database data types (especially shp).<br>
It does not seem too difficult, now that we have a record number function in the<br>
expressions.<br>
All the best.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Paolo Cavallini - <a href="http://www.faunalia.eu" target="_blank">www.faunalia.eu</a><br>
Corsi QGIS e PostGIS: <a href="http://www.faunalia.eu/training.html" target="_blank">http://www.faunalia.eu/training.html</a><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>