<?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 set multiple conditions in definition expression of a feature layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422954#M38897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Manojraj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This time it did work. May be there was some issue with the expression string that was getting created. Now when I do &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;blockLayer.getDefinitionExpression()&lt;/PRE&gt;&lt;SPAN&gt; it gives me "STATE_FIPS = '01' AND CNTY_FIPS='001'".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Oct 2013 12:26:01 GMT</pubDate>
    <dc:creator>NiranjanBorawake</dc:creator>
    <dc:date>2013-10-28T12:26:01Z</dc:date>
    <item>
      <title>How to set multiple conditions in definition expression of a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422952#M38895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I set definition expression of a county layer to &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;countyLayer.setDefinitionExpression("STATE_FIPS = '" + fips + "'");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; only the counties in state with FIPS as &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;fips&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; are rendered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, what I need to do is render all the blocks inside a county of a state. Block group layer has STATE_FIPS (length 2 ) and CNTY_FIPS (length 3). If I set definition expression to &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;blockLayer.setDefinitionExpression("CNTY_FIPS = '" + countyFips + "'");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, this will render blocks inside county with CNTY_FIPS = countyFips. But, since CNTY_FIPS is of length 3 and this expression matches for county in every state and blocks inside all the counties of the states are rendered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying or rather what I need to do is &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;blockLayer.setDefinitionExpression("CNTY_FIPS = '" + countyFips + "' AND STATE_FIPS = '" + fips + "'");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This way only blocks inside a state with STATE_FIPS = fips will be renedered. But combining expression with AND does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be apreciated. Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 11:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422952#M38895</guid>
      <dc:creator>NiranjanBorawake</dc:creator>
      <dc:date>2013-10-28T11:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set multiple conditions in definition expression of a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422953#M38896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Niranjan Borawake,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could you run the definition expression string you get after merging the string in rest endpoint and find out what exactly error.Actually all the expression from SQL works for the service there may be string format error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manojraj Teli&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 11:42:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422953#M38896</guid>
      <dc:creator>ManojrajTeli</dc:creator>
      <dc:date>2013-10-28T11:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set multiple conditions in definition expression of a feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422954#M38897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Manojraj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This time it did work. May be there was some issue with the expression string that was getting created. Now when I do &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;blockLayer.getDefinitionExpression()&lt;/PRE&gt;&lt;SPAN&gt; it gives me "STATE_FIPS = '01' AND CNTY_FIPS='001'".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 12:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-set-multiple-conditions-in-definition/m-p/422954#M38897</guid>
      <dc:creator>NiranjanBorawake</dc:creator>
      <dc:date>2013-10-28T12:26:01Z</dc:date>
    </item>
  </channel>
</rss>

