<?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 LabelClass with where clause in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-with-where-clause/m-p/596979#M55940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey!&lt;/P&gt;&lt;P&gt;i am wondering if somebody has done some sort of test regarding labelclass with where clause&lt;/P&gt;&lt;P&gt;i have already used the sandbox mentioned in the documentation with the following where clause code as mentioned in the documentation as well&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;labelClass&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #333333; font-weight: bold;"&gt;where&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #dd1144;"&gt;"areaname='Redlands'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=layers_label" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=layers_label"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&lt;/P&gt;&lt;P&gt;i changed areaname to STATE_NAME and replaced Redlands to Texas for example and the filtering does not work at all&lt;/P&gt;&lt;P&gt;i just get no labels att all&lt;/P&gt;&lt;P&gt;i have played a little with the syntax and get it working with the following code&lt;/P&gt;&lt;P&gt;labelClass.where = "'STATE_NAME' = Utah";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have also another question regarding the use of LIKE statement instead of equal&lt;/P&gt;&lt;P&gt;is there somebody who has an idea who can we do this for example&lt;/P&gt;&lt;P&gt;labelClass.where = "'STATE_NAME' like '%U'";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Feb 2016 12:36:52 GMT</pubDate>
    <dc:creator>AnasKanaan</dc:creator>
    <dc:date>2016-02-23T12:36:52Z</dc:date>
    <item>
      <title>LabelClass with where clause</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-with-where-clause/m-p/596979#M55940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey!&lt;/P&gt;&lt;P&gt;i am wondering if somebody has done some sort of test regarding labelclass with where clause&lt;/P&gt;&lt;P&gt;i have already used the sandbox mentioned in the documentation with the following where clause code as mentioned in the documentation as well&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;labelClass&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #333333; font-weight: bold;"&gt;where&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #dd1144;"&gt;"areaname='Redlands'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=layers_label" title="http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=layers_label"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&lt;/P&gt;&lt;P&gt;i changed areaname to STATE_NAME and replaced Redlands to Texas for example and the filtering does not work at all&lt;/P&gt;&lt;P&gt;i just get no labels att all&lt;/P&gt;&lt;P&gt;i have played a little with the syntax and get it working with the following code&lt;/P&gt;&lt;P&gt;labelClass.where = "'STATE_NAME' = Utah";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have also another question regarding the use of LIKE statement instead of equal&lt;/P&gt;&lt;P&gt;is there somebody who has an idea who can we do this for example&lt;/P&gt;&lt;P&gt;labelClass.where = "'STATE_NAME' like '%U'";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2016 12:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-with-where-clause/m-p/596979#M55940</guid>
      <dc:creator>AnasKanaan</dc:creator>
      <dc:date>2016-02-23T12:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass with where clause</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-with-where-clause/m-p/596980#M55941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/179126"&gt;Anas Kanaan&lt;/A&gt;​ it looks like there is a &lt;A href="http://support.esri.com/en/bugs/nimbus/QlVHLTAwMDA5Mzc3MA=="&gt;current issue&lt;/A&gt; with the where clause and the labelClass and I have experienced the same behavior as well. From my experience, if you need to use custom logic with labels in JavaScript it's easier to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Publish Annotation from ArcMap&lt;/P&gt;&lt;P&gt;2. Use a TextSymbol instead of a LabelClass.&amp;nbsp; Go the service and get the labels you need, then consume them with a TextSymbol.&amp;nbsp; This gives you more fine-grained control.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 16:43:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-with-where-clause/m-p/596980#M55941</guid>
      <dc:creator>DavidChambers1</dc:creator>
      <dc:date>2016-03-09T16:43:55Z</dc:date>
    </item>
  </channel>
</rss>

