<div style="font-family: 'Calibri', 'sans-serif';">
<div>Destination field matters. While the destination field has numeric type, and values can of course be converted to numbers then conversion will succeed and values will be numerically typed.</div><div><br></div><div>Envoyé depuis mon HTC</div>

<br><div id="htc_header">----- Reply message -----<br>De : "Matteo Ghetta" <matteo.ghetta@gmail.com><br>Pour : "Junior Delaz" <delazj@gmail.com><br>Cc : "qgis-developer" <qgis-developer@lists.osgeo.org><br>Objet : [Qgis-developer] problem with 'toreal' in field calculator<br>Date : mar., mars 10, 2015 18:29</div></div><br><div dir="ltr"><div><div><div>Hi Junior,<br></div>thanks, get it. So numeric conversion are sinful only between numeric fields right?<br><br></div>Cheers<br><br></div>Matteo<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-10 18:25 GMT+01:00 Junior Delaz <span dir="ltr"><<a href="mailto:delazj@gmail.com" target="_blank">delazj@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>hi,<br></div><div><br></div>If your field is recognized by QGIS as a string one, trying to overwrite its values type will fail as they are intended to be string in THIS field. This is why when you create a new numeric field and make conversion, it's ok (this new field expect numeric values, so it'll recognize your conversion).<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-03-10 18:08 GMT+01:00 Matteo Ghetta <span dir="ltr"><<a href="mailto:matteo.ghetta@gmail.com" target="_blank">matteo.ghetta@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div>Hi all,<br></div>I have a filed made up by numeric values but recognized as text (should be a WFS issue and not a QGIS problem).<br></div>I've used the 'toreal' function of the field calculator in order to update the field but nothing changed (numbers are still read as text).<br></div><div>Strange is that if I create a new field using the 'toreal' function, values are correctly read as numbers and not as text.<br><br></div><div>Am I missing something or can be a bug?<br><br></div><div>BTW: debian testing and QGIS 2.8.1<br><br></div><div>Cheers<span><font color="#888888"><br><br></font></span></div><span><font color="#888888"><div>Matteo<br></div><br></font></span></div>
<br></div></div>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">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></blockquote></div><br></div>
</blockquote></div><br></div>