<?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 Simple VBScript Label Expression for labelling certain records of a shapefile in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473475#M6596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a water feature shapefile have the names of all the records (names of the lakes, rivers, creeks, etc), but I only want to label certain water features (the major lakes for example) and at the same time showing all the water features (that is not definition querying out certain records) on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By default labelling it would label all the records, which is not my preference for the map visualization.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Is there a VBScript Label Expression for labelling certain records of a shapefile ?&lt;/STRONG&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(In this case, I know the names of the major water features which I want to label). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because right now I has been labelling them one-by-one using the text tool, which is not quit efficient at times.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2012 18:36:38 GMT</pubDate>
    <dc:creator>KittyYiu</dc:creator>
    <dc:date>2012-07-25T18:36:38Z</dc:date>
    <item>
      <title>Simple VBScript Label Expression for labelling certain records of a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473475#M6596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a water feature shapefile have the names of all the records (names of the lakes, rivers, creeks, etc), but I only want to label certain water features (the major lakes for example) and at the same time showing all the water features (that is not definition querying out certain records) on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By default labelling it would label all the records, which is not my preference for the map visualization.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Is there a VBScript Label Expression for labelling certain records of a shapefile ?&lt;/STRONG&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(In this case, I know the names of the major water features which I want to label). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because right now I has been labelling them one-by-one using the text tool, which is not quit efficient at times.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:36:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473475#M6596</guid>
      <dc:creator>KittyYiu</dc:creator>
      <dc:date>2012-07-25T18:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple VBScript Label Expression for labelling certain records of a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473476#M6597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can apply a similar type of query that applies only to the labels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open the properties for that layer and go to the Label tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select the field to label by (ie, [FEAT_NAME]) and press the "Expression" button.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Place a checkmark beside "advanced" and read over this recent thread on how to do just that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/63054-Labels-again.-Sorry"&gt;http://forums.arcgis.com/threads/63054-Labels-again.-Sorry&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;SPAN&gt;Let the forum know if you have any issues.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your case, you may need to incorporate a wildcard like the '%' operator, inStr function, or a regular expression.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 20:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473476#M6597</guid>
      <dc:creator>DonovanCameron</dc:creator>
      <dc:date>2012-07-25T20:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple VBScript Label Expression for labelling certain records of a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473477#M6598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It works, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Function FindLabel ( [NAME] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if ( [NAME] = "Lake A" ) then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; FindLabel = [NAME]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;end if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But how do I set it that it would only label the "Lake A", the "Lake B", and the "Lake C" ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think I can use wildcard like the '%' in my case, as sometime the names of the water features goes like this "Lake A", or "B Lake"; "B River", or "River B".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 20:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473477#M6598</guid>
      <dc:creator>KittyYiu</dc:creator>
      <dc:date>2012-07-25T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Simple VBScript Label Expression for labelling certain records of a shapefile</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473478#M6599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;But how do I set it that it would only label the "Lake A", the "Lake B", and the "Lake C" ?&lt;BR /&gt;&lt;BR /&gt;I don't think I can use wildcard like the '%' in my case, as sometime the names of the water features goes like this "Lake A", or "B Lake"; "B River", or "River B".&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have a small set of records you want to label, try using OR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[LEFT]&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;Function FindLabel ( [NAME] )&lt;/SPAN&gt;
&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&amp;nbsp; if ( [NAME] = "Lake A" ) OR &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;( [NAME] = "Lake B" )&lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&amp;nbsp; then&lt;/SPAN&gt;
&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindLabel = [NAME]&lt;/SPAN&gt;
&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;&amp;nbsp; end if&lt;/SPAN&gt;
&lt;SPAN style="color: #3E3E3E; font-family: Arial;"&gt;End Function&lt;/SPAN&gt;[/LEFT]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your OR statement is getting large, try to incorporate the IN operator instead of OR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[NAME] IN ('LAKE A', 'LAKE B', 'C LAKE')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although I always have trouble including IN inside a vbscript label expression, mostly because the syntax is different depending on the data storage format (shapefiles vs geodatabase, etc...).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:56:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/simple-vbscript-label-expression-for-labelling/m-p/473478#M6599</guid>
      <dc:creator>DonovanCameron</dc:creator>
      <dc:date>2021-12-11T20:56:13Z</dc:date>
    </item>
  </channel>
</rss>

