On 23 December 2016 at 23:37, Paolo Cavallini <[email protected]> wrote: > Il 23/12/2016 14:32, Giovanni Manghi ha scritto: > >> The solution from the Gitter discussion >> >> aggregate( 'layername','max',"id")+1 > > thanks Giovanni > >> We need of course a more user friendly way to allow users have >> incremental/serial ids in their shapefiles... > > sure, e.g. a named preset expression, as previously suggested. > all the best.
In master you can add UNIQUE and NOT NULL constraints to the field from within QGIS. This will cause QGIS to automatically populate it with a serial type value whenever a new feature is created. Nyall > -- > Paolo Cavallini - www.faunalia.eu > QGIS & PostGIS courses: http://www.faunalia.eu/training.html > https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis > _______________________________________________ > Qgis-developer mailing list > [email protected] > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
