<div dir="ltr">Thanks a lot,<div><br></div><div>I combine both advises, and get at last this</div><div><br></div><div>CASE WHEN "NAME_GEO" IS NOT NULL THEN CONCAT ("NAME_GEO", "ELEV") ELSE "ELEV" END<br></div><div><br></div><div>it works at last </div><div><br></div><div>Thanks a lot :)</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 6:29 PM, Andreas Neumann <span dir="ltr"><<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
You need to use COALESCE(labelfield,'alternate text')<br>
<br>
If the label contains data, the data is used, if it contains NULL,
the alternate text is displayed, which often is an empty string, a
replacement text or another field.<br>
<br>
In your case, you could use:<br>
<br>
COALESCE("NAME_GEO" || '(' || elev || ')','elev')<br>
<br>
In case it has a name, the name is displayed with elevation, if it
is null, then the elevation is displayed.<br>
<br>
This is the same syntax like SQL is using.<br>
<br>
Hope this helps,<br>
Andreas<div><div class="h5"><br>
<br>
<div>On 15.05.2015 16:01, Irakli Ugulava
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">For physical map need to label summits and
elevation points, some of them have name some no, so I need to
label them from different fields.
<div><br>
</div>
<div>when I use expression :</div>
<div><br>
</div>
<div>"NAME_GEO" || "elev"</div>
<div><br>
</div>
<div>It works, but summits with no names, (field "NAME_GEO" is
empty), has no label at all, according to ArcGis logic they
should have only elevation on labels.</div>
<div><br>
</div>
<div>I try following expression </div>
<div>CASE WHEN "name_geo" is null THEN "NAME_GEO" ||
"ELEV" ELSE "elev"</div>
<div><br>
</div>
<div>but it return no labels at all.</div>
<div><br>
</div>
<div>Thanks All<br clear="all">
<div><br>
</div>
-- <br>
<div>Irakli Ugulava
<div>Senior GIS Expert, Cofounder <br>
<div>GeoLand Ltd.</div>
<div>3 Telegraph Cule-de-sac</div>
<div>Tbilisi 0105, Georgia, </div>
<div>Tel: +995 32 922553</div>
<div>Mob +995 99 172016</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Qgis-user mailing list
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
</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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Irakli Ugulava<div>Senior GIS Expert, Cofounder <br><div>GeoLand Ltd.</div><div>3 Telegraph Cule-de-sac</div><div>Tbilisi 0105, Georgia, </div><div>Tel: +995 32 922553</div><div>Mob +995 99 172016</div><div><br></div></div></div>
</div>