<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Franklin Gothic Book";
        panose-1:2 11 5 3 2 1 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-postmall18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Do you really need the ID field in the shapefile? If not you can drop it, hide it or ignore it and it works anyway. If you need a counter as primary
 key consider using another data provider suggested by Andreas.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Franklin Gothic Book","sans-serif";color:#1F497D">Karl-Magnus Jönsson</span></b><span style="font-size:10.0pt;font-family:"Franklin Gothic Book","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Från:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Qgis-user [mailto:qgis-user-bounces@lists.osgeo.org]
<b>För </b>Neumann, Andreas<br>
<b>Skickat:</b> den 31 maj 2016 14:04<br>
<b>Till:</b> Simon Muirhead<br>
<b>Kopia:</b> qgis-user@lists.osgeo.org<br>
<b>Ämne:</b> Re: [Qgis-user] Auto-fill id in attribute table when creating a feature<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Hi Simon,<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">It is a bit data provider dependent. For many data providers (e.g. Postgis, SpatiaLite, Geopackage) you just don't fill in this value (or better set the edit widget to "read only") - provided
 that the database has a sequence defined for the primary key column. The values are filled in when saving the data. In 2.16 there is a new mode for PostgreSQL to immediately get the id value (experimental).<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">What data format are you using?<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Greetings,<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Andreas<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">On 2016-05-31 13:43, Simon Muirhead wrote:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0cm 0cm 0cm 5.0pt;margin-left:0cm;margin-right:0cm">
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Hi, I am new to QGIS, coming from ARCGiS. I was wondering when creating a new feature in a shape file, QGIS asks to fill in the id in the attribute table for every feature created. Is there
 anyway to have this done automatically like ARCGiS does?<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">Regards, Simon Muirhead<br>
Written from my Nexus 6P so don't expect Tolstoy.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></span></p>
</div>
</blockquote>
<p><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""> <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""> <o:p></o:p></span></p>
</div>
</div>
</body>
</html>