<div dir="ltr">Hey,<div><br></div><div>QgsExpression doesn't treat NULL and Empty string as the same thing. Which is why we don't auto convert.  To convert nulls in a field you should use the <span style="color:rgb(48,48,48);font-family:monospace;font-size:11.818181991577148px">coalesce("Areatype",'')</span></div>

<div><br></div><div>See <a href="http://hub.qgis.org/issues/8369">http://hub.qgis.org/issues/8369</a></div><div><br></div><div>- Nathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 7:35 AM, Larry Shaffer <span dir="ltr"><<a href="mailto:larrys@dakotacarto.com" target="_blank">larrys@dakotacarto.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Lene,<br><div><div class="gmail_extra"><br><div class="gmail_quote"><div class="im">On Thu, Aug 1, 2013 at 2:25 PM, Lene Fischer <span dir="ltr"><<a href="mailto:lfi@life.ku.dk" target="_blank">lfi@life.ku.dk</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Goyo<br>
The geometries is OK.<br>
I have a combined label Ex.<br>
Areatype || '\n' ||  $Area   || ' m2'<br>
Now I found that if one field is empty (Even if there is NULL in the field), then the entire label will not be displayed.<br></blockquote><div><br></div></div><div>When the expression-based label text was introduced, NULL values supposedly where just converted to empty strings [0], i.e. if Areatype was NULL, one would expect at least 'm2' to be present in the label.<br>


<br></div><div>Try enclosing your field name Areatype in double quotes. Also, try without the $Area function, but still with the || concatenation. If the label still does not contain any text, then it is probably a bug in how QgsExpression handles NULL values from the data provider. If so, please create an issue ticket [1]. Include a test project file, and try to list reproducible steps, if you can.<br>


</div><div><br>[0] <a href="http://osgeo-org.1560.x6.nabble.com/Expression-based-labeling-tp4100735p4100736.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Expression-based-labeling-tp4100735p4100736.html</a><br>

[1] <a href="http://hub.qgis.org/projects/quantum-gis/issues" target="_blank">http://hub.qgis.org/projects/quantum-gis/issues</a><br>
<br></div><div>Regards,<br></div><div><br></div><div>Larry<br></div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


Regards<br>
Lene<br>
<br>
<br>
<br>
________________________________________<br>
Fra: Goyo [<a href="mailto:goyodiaz@gmail.com" target="_blank">goyodiaz@gmail.com</a>]<br>
Sendt: 1. august 2013 20:40<br>
Til: Lene Fischer<br>
Cc: <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
Emne: Re: [Qgis-user] Label missing in Weekly<br>
<br>
2013/8/1 Lene Fischer <<a href="mailto:lfi@life.ku.dk" target="_blank">lfi@life.ku.dk</a>>:<br>
> Hello<br>
> I´m using the new labelfunction - it is great!! - but som of the labels are<br>
> missing. I have a small project with only 9 polygons, but only 7 labels is<br>
> visible.<br>
> I´ve tried:<br>
><br>
> Settings to "View all labels in all layers"<br>
> change attributefield and size<br>
><br>
> Same result. Any suggestions?<br>
> Regards<br>
> Lene Fischer<br>
<br>
You might have invalid geometries. They are not labelled IIRC.<br>
<br>
Goyo<br>
<br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div></div></div><br></div></div></div>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div><br></div>