<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to not display NULL Values in a string label in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741568#M24387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that is true, however the vb expression comes in handy if you would like to add characters or spaces between each value, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function FindLabel ([field 1], [field 2], [field 3])&lt;BR /&gt;If [field 3] &amp;lt;&amp;gt; " " then &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; "-" &amp;amp; [field 2] &amp;amp; "-" &amp;amp; [field 3] &lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; "-" &amp;amp; [field 2]&lt;BR /&gt;end if&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then the last dash doesn't show up if the last value is null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Mar 2017 13:10:33 GMT</pubDate>
    <dc:creator>NinaRihn</dc:creator>
    <dc:date>2017-03-27T13:10:33Z</dc:date>
    <item>
      <title>How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741563#M24382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feature class that I want to label based on three fields. It would be great if the first two fields always displayed, and the third only displayed when it isn't null. I have added all the field to a label no problem like this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/343208_pastedImage_1.png" style="width: 620px; height: 379px;" /&gt;&lt;/P&gt;&lt;P&gt;Is it possible to eliminate the word NULL in three of the five examples above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:16:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741563#M24382</guid>
      <dc:creator>KevinWyckoff2</dc:creator>
      <dc:date>2017-03-20T16:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741564#M24383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-text/displaying-labels-using-label-classes-to-label-fea.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-text/displaying-labels-using-label-classes-to-label-fea.htm"&gt;Using label classes to label features from the same layer differently—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Create two classes and define SQL Query to identify the subset of the features you want to label in each class.&lt;/P&gt;&lt;P&gt;1. [Field3] IS NULL&lt;/P&gt;&lt;P&gt;2. [Field3] IS NOT NULL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Label Expression for Class 1&lt;/P&gt;&lt;P&gt;[Field1] + " " + [Field2]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Label Expression for Class 2&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[Field1] + " " + [Field2] + " " + [Field3]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741564#M24383</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2017-03-20T16:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741565#M24384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to using label classes, you can define a FindLabel function (make sure to check 'Advanced'):&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FindLabel&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field2&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field3&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; field &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field2&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Field3&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parser:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;Python&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:34:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741565#M24384</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T07:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741566#M24385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could add this vb expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function FindLabel ([field 1], [field 2], [field 3])&lt;BR /&gt;If [field 3] &amp;lt;&amp;gt; " " then &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; " " &amp;amp; [field 2] &amp;amp; " " &amp;amp; [field 3] &lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; " " &amp;amp; [field 2]&lt;BR /&gt;end if&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works for me even with Null values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 21:31:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741566#M24385</guid>
      <dc:creator>NinaRihn</dc:creator>
      <dc:date>2017-03-24T21:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741567#M24386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have Null values in your field , it is automatically doesn't appear in label.&lt;/P&gt;&lt;P&gt;Just&amp;nbsp;use simple expression: parser&amp;nbsp;VBScript &amp;gt;&lt;/P&gt;&lt;P&gt;[Field1] &amp;amp; [Field2] &amp;amp;[Field3]&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 22:02:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741567#M24386</guid>
      <dc:creator>AbdullahAnter</dc:creator>
      <dc:date>2017-03-24T22:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to not display NULL Values in a string label</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741568#M24387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that is true, however the vb expression comes in handy if you would like to add characters or spaces between each value, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function FindLabel ([field 1], [field 2], [field 3])&lt;BR /&gt;If [field 3] &amp;lt;&amp;gt; " " then &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; "-" &amp;amp; [field 2] &amp;amp; "-" &amp;amp; [field 3] &lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [field 1] &amp;amp; "-" &amp;amp; [field 2]&lt;BR /&gt;end if&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then the last dash doesn't show up if the last value is null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 13:10:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-not-display-null-values-in-a-string-label/m-p/741568#M24387</guid>
      <dc:creator>NinaRihn</dc:creator>
      <dc:date>2017-03-27T13:10:33Z</dc:date>
    </item>
  </channel>
</rss>

