[Qgis-user] Numbering Fields by custom squence

st_kiefer at web.de st_kiefer at web.de
Tue Mar 19 05:23:10 PDT 2019


Hi,

first idea could be something like this:

concat('OBST',lpad(to_string($id), 4, '0'))

if you don't need concrete values. You might also add an offset to $id.

concat('OBS',lpad(to_string($id + <offset>), 4, '0'))

Hope that helps.

Regards.


Stefan

> Krišjānis Sietiņš <krisjanis at terratopo.lv> hat am 19. März 2019 um 12:44 geschrieben:
> 
> 
>     Hello!
> 
>     I am writing fires time here.
> 
>     QGIS version 2.18.20
> 
>     We need to make user defined continuous ID numbering in attribute table for fields. ID should contain some letters that define objects type. For example starting from OBST0200 to OBST0315. And objects are too much to do it manually.
> 
>     I found Sort and Number plugin, but it has only number option.
> 
>     Can it be done in Field calculator and what expression should we use?
> 
>      
> 
>     With Best Regrads
> 
>     Krišjānis Sietiņš
> 
> 


 

> _______________________________________________
>     Qgis-user mailing list
>     Qgis-user at lists.osgeo.org
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190319/c65b2737/attachment.html>


More information about the Qgis-user mailing list