<?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: If-then label expressions using wildcard in Public Safety Questions</title>
    <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77466#M79</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much, Jon. This is exactly what I was looking for! I didn't realize LIKE wasn't a VB operator. One quick additional question: what would be the best way to include an OR statement so that the expression includes "Ladder" and "Tower" (two different kinds of aerial apparatus)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2016 15:59:51 GMT</pubDate>
    <dc:creator>deleted-user-yFo_UoWEJbkc</dc:creator>
    <dc:date>2016-07-18T15:59:51Z</dc:date>
    <item>
      <title>If-then label expressions using wildcard</title>
      <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77464#M77</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a feature class for fire stations, and I'm trying to label only those fire stations that have a ladder truck (based on the [APPARATUS1] field), but I can't get the wildcard expression to work. Conversely, when I use the = operator, it returns the value just fine ([ID] is the station number) and labels the appropriate station:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function FindLabel ( [ID], [APPARATUS1] )&lt;/P&gt;&lt;P&gt; if ( [APPARATUS1] = "Ladder 100' Tiller" ) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; FindLabel = "Station " &amp;amp; [ID] &amp;amp; vbnewline &amp;amp; [APPARATUS1] &lt;/P&gt;&lt;P&gt; end if&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I try to catch all the stations with ladders, I only get syntax errors with the following wildcard expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function FindLabel ( [ID], [APPARATUS1] )&lt;/P&gt;&lt;P&gt; if ( [APPARATUS1] LIKE "Ladder%" ) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; FindLabel = "Station " &amp;amp; [ID] &amp;amp; vbnewline &amp;amp; [APPARATUS1] &lt;/P&gt;&lt;P&gt; end if&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help in figuring out what I'm missing would be much appreciated. I've tried various combinations of single-quotes, asterisk wildcard character, etc., but nothing works. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77464#M77</guid>
      <dc:creator>deleted-user-yFo_UoWEJbkc</dc:creator>
      <dc:date>2016-07-18T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: If-then label expressions using wildcard</title>
      <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77465#M78</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The LIKE keyword is for SQL queries. In VB, you need to do something similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ( InStr( [APPARATUS1], "Ladder" ) &amp;lt;&amp;gt; 0 ) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;This is case sensitive; to make the comparison case insensitive, you can use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ( InStr( &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;LCase([APPARATUS1])&lt;/SPAN&gt;, "ladder" ) &amp;lt;&amp;gt; 0 ) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77465#M78</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2016-07-18T15:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: If-then label expressions using wildcard</title>
      <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77466#M79</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much, Jon. This is exactly what I was looking for! I didn't realize LIKE wasn't a VB operator. One quick additional question: what would be the best way to include an OR statement so that the expression includes "Ladder" and "Tower" (two different kinds of aerial apparatus)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77466#M79</guid>
      <dc:creator>deleted-user-yFo_UoWEJbkc</dc:creator>
      <dc:date>2016-07-18T15:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: If-then label expressions using wildcard</title>
      <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77467#M80</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can just copy and paste the whole expression, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;If ( InStr( [APPARATUS1], "Ladder" ) &amp;lt;&amp;gt; 0 OR &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;InStr( [APPARATUS1], "Tower" ) &amp;lt;&amp;gt; 0 &lt;/SPAN&gt;) Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;My VB is a bit rusty though, I mostly use python these days.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 16:14:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77467#M80</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2016-07-18T16:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: If-then label expressions using wildcard</title>
      <link>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77468#M81</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right again, sir, and yes, I need to move past VB myself. Nevertheless, thanks for your help on this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 16:35:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/public-safety-questions/if-then-label-expressions-using-wildcard/m-p/77468#M81</guid>
      <dc:creator>deleted-user-yFo_UoWEJbkc</dc:creator>
      <dc:date>2016-07-18T16:35:35Z</dc:date>
    </item>
  </channel>
</rss>

