<div dir="auto">Hi,<br><br><div class="gmail_quote" dir="auto"><div dir="ltr">Il Ven 13 Lug 2018, 14:26 Martin Bittens <<a href="mailto:martin.bittens@gmx.de" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">martin.bittens@gmx.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello QGIS Users.<br>
<br>
<br>
I want to create a text field in an attribute table which contains some <br>
data points by using the field calculator. So I selected:<br>
<br>
<br>
- Create a new field<br>
<br>
- Output field name: Comment<br>
<br>
- Output field type: Text (string)<br>
<br>
- Output field length: 10<br>
<br>
- Text input: 'Area 2'<br>
<br>
<br>
The Output preview shows: 'Area 2'. By clicking on "OK" I receive the <br>
following message: "Could not add the new field to the provider"<br>
<br>
My system is: Windows 10, QGIS2.18.21.<br>
<br>
In the previous versions of QGIS I did not get that error when I added <br>
with the field calculator text fields in attribute tables.<br>
<br>
Does somebody know a solution solving the error?<br>
<br>
<br>
Thank you very much.<br>
<br>
<br>
Martin<br></blockquote></div><div dir="auto"><br></div><div dir="auto">this is a known issue [0] and there already is a patch to fix it [1].</div><div dir="auto"><br></div><div dir="auto">A workaround that you could adopt before the patch get merged is changing the precision value from 3 to 0 for the text field being created. </div><div dir="auto">To change the precision value you have to select the decimal type before in order to enable the spinbox widget.</div><div dir="auto"><br></div><div dir="auto">Best Regards.</div><div dir="auto"><br></div><div dir="auto">[0] - <a href="https://issues.qgis.org/issues/19283" rel="noreferrer noreferrer" target="_blank">https://issues.qgis.org/issues/19283</a></div><div dir="auto">[1] - <a href="https://github.com/qgis/QGIS/pull/7375" rel="noreferrer noreferrer" target="_blank">https://github.com/qgis/QGIS/pull/7375</a></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>