<?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 Advanced Label Expression in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359924#M4902</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am desperately trying to figure out how to NOT LABEL something. I have one field with all of my labels in it. The field is titled "As_Comment"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have features such as pillars that I have data on and other structures but I don't want them to be labeled. When I try to just label a specific pillar to test my expression it works. However, when I try to use a wildcard (as there are many pillars ie pier 69, pier 70, pier 71, etc) the code is still verified and accepted but it still labels everything. I decided to go all out and see if I could NOT LABEL 2 items, messed up the code &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt; that was partially working and had to start all over again. Below is what I have at the moment after starting over again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function FindLabel ( [AS_COMMENT] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if [AS_COMMENT] &amp;lt;&amp;gt; ("PIER %") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then FindLabel&amp;nbsp; [AS_COMMENT]&amp;nbsp; =(" ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = [AS_COMMENT] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, how would I write it if I didn't want to label 2 items? Say if I didn't want to label andthing with "PIER" in it AND anything with "CIP" in it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any speedy help on this is very much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2011 00:45:59 GMT</pubDate>
    <dc:creator>RhiawnaBracci</dc:creator>
    <dc:date>2011-09-02T00:45:59Z</dc:date>
    <item>
      <title>Advanced Label Expression</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359924#M4902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am desperately trying to figure out how to NOT LABEL something. I have one field with all of my labels in it. The field is titled "As_Comment"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have features such as pillars that I have data on and other structures but I don't want them to be labeled. When I try to just label a specific pillar to test my expression it works. However, when I try to use a wildcard (as there are many pillars ie pier 69, pier 70, pier 71, etc) the code is still verified and accepted but it still labels everything. I decided to go all out and see if I could NOT LABEL 2 items, messed up the code &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt; that was partially working and had to start all over again. Below is what I have at the moment after starting over again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function FindLabel ( [AS_COMMENT] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if [AS_COMMENT] &amp;lt;&amp;gt; ("PIER %") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;then FindLabel&amp;nbsp; [AS_COMMENT]&amp;nbsp; =(" ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = [AS_COMMENT] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, how would I write it if I didn't want to label 2 items? Say if I didn't want to label andthing with "PIER" in it AND anything with "CIP" in it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any speedy help on this is very much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 00:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359924#M4902</guid>
      <dc:creator>RhiawnaBracci</dc:creator>
      <dc:date>2011-09-02T00:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Label Expression</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359925#M4903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Rhiawna,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why don't you set up a label class with a SQL Query instead of doing this in a label expression? The SQL Query would be pretty simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"AS_COMMENT" NOT LIKE '%PIER%' AND "AS_COMMENT" NOT LIKE '%CIP%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 22:30:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359925#M4903</guid>
      <dc:creator>DavidWatkins</dc:creator>
      <dc:date>2011-09-02T22:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Label Expression</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359926#M4904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Rhiawna,&lt;BR /&gt;&lt;BR /&gt;Why don't you set up a label class with a SQL Query instead of doing this in a label expression? The SQL Query would be pretty simple:&lt;BR /&gt;&lt;BR /&gt;"AS_COMMENT" NOT LIKE '%PIER%' AND "AS_COMMENT" NOT LIKE '%CIP%'&lt;BR /&gt;&lt;BR /&gt;David&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After much testing this is how it needs to be for SQL Query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOT "AS_COMMENT" LIKE 'PIER%' AND "AS_COMMENT" &amp;lt;&amp;gt; 'CIP' AND "AS_COMMENT" &amp;lt;&amp;gt; 'PRE'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The NOT has to be before the field for some reason. If you don't do it that way you'll get an invalid SQL statement error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you wanted it in VB then it'd be like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Function FindLabel ( [AS_COMMENT] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if instr( [AS_COMMENT], "PIER") = 0 and instr( [AS_COMMENT], "CIP") = 0 then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [AS_COMMENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your suggestion &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's truly aggrivating that there isn't more ESRI help in this matter. I find it rediculous that it took several days and multiple people to figure out what should be so simple.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 16:23:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/advanced-label-expression/m-p/359926#M4904</guid>
      <dc:creator>RhiawnaBracci</dc:creator>
      <dc:date>2011-09-06T16:23:57Z</dc:date>
    </item>
  </channel>
</rss>

