<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body 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<br>
<br>
<div class="moz-cite-prefix">On 15.05.2015 16:01, Irakli Ugulava
wrote:<br>
</div>
<blockquote
cite="mid:CALDcodX6m9bSd_NTY2aJwAkgDuq28+13mTEMS4mnuK_eaG2=OA@mail.gmail.com"
type="cite">
<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 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>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
</body>
</html>