Thanks Andreas. Glad you like it.<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">&gt;&gt; Question 1: the output preview of the label does not seem to work when I use a field - is there something I need to &gt;&gt;do to enable it? I would expect it to pull in the first record or some random record to retrieve values?<br>

<br></div><div>Ah yes there seems to be a bug with grabbing the first record with some data sources.  I get the top feature using layer.featureAt(0) but for some reason not all providers return a record at this index.  Writing a patch now.</div>

<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">&gt;&gt;Question 2: how does it handle empty fields (null values)? would string concatenation still work or do we need to &gt;&gt;coalesce() like in PostreSQL?</div>

<div><br></div><div>Yeah null values when used with || are just converted to empty strings.</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">&gt;&gt; Remark:<br>&gt;&gt; wouldn&#39;t it be cleverer to use your great new query builder and introduce the concept of a &quot;virtual column&quot; in the &gt;&gt;data provider? </div>

<div><br></div><div>That would be a cool idea and something I have thought about, just don&#39;t have the skills or time at present.  I plan to redo the field calculator to use my new expression builder widget at some stage so we can look at the virtual column thing then.</div>

<div><br></div><div>- Nathan </div><div><br></div><div><div class="gmail_quote">On Thu, Oct 27, 2011 at 5:46 PM, Andreas Neumann <span dir="ltr">&lt;<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Nathan and others,<br>
<br>
Thanks for developing the expression based labeling. Wow - it really looks great.<br>
<br>
I have two questions and a remark:<br>
<br>
Question 1: the output preview of the label does not seem to work when I use a field - is there something I need to do to enable it? I would expect it to pull in the first record or some random record to retrieve values?<br>


<br>
Question 2: how does it handle empty fields (null values)? would string concatenation still work or do we need to coalesce() like in PostreSQL?<br>
<br>
Remark:<br>
wouldn&#39;t it be cleverer to use your great new query builder and introduce the concept of a &quot;virtual column&quot; in the data provider? This way we could use your query builder for labeling, for tooltips, for read only display in tables and forms and in the identify tool. Potentially in the future in other scenarios as well? The query builder would then extend the data provider and introduce a new virtual column which could then be treated like all other columns, but read only.<br>


<br>
Thanks a lot for your cool work and feature enhancement towards labeling!<br>
<br>
Andreas<br>
<br>
-- <br><font color="#888888">
--<br>
Andreas Neumann<br>
Böschacherstrasse 10A<br>
8624 Grüt (Gossau ZH)<br>
Switzerland<br>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</font></blockquote></div><br></div>