<?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: FeatureLayer with Definition Expression and query features in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660770#M61690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Songissimo, try using the selectFeatures function against your Feature Layer that you had previously applied setDefinitionExpression.&lt;BR /&gt;&lt;BR /&gt;Code:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var select = featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);

select.then(function (features) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("select features result: ", features);
}&lt;/PRE&gt;&lt;BR /&gt;This is what I am using in my application do what you describe you are looking for.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cwilcomb I'm glad to you&amp;nbsp; for both reply to my two posts. I've tested your solution but It doesn't behaves as I expected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It enquiries the layer but anyway it gives me all feature in the layer that match the specific clause (the one defined by query element) &lt;/SPAN&gt;&lt;STRONG&gt;instead of give only ones that match the specific condition that belong to the set selected with selectFeatures&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is very very strange, can it be a bug in the apis?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:57:55 GMT</pubDate>
    <dc:creator>demdeberanz</dc:creator>
    <dc:date>2021-12-12T03:57:55Z</dc:date>
    <item>
      <title>FeatureLayer with Definition Expression and query features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660768#M61688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I set a definition expression in a feature layer and it rightly shows just the features that match this expression. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I perform a query with queryFeatures function (or also with a query task) it gives me all the layer's features that match the query's where clause and &lt;/SPAN&gt;&lt;STRONG&gt;not only the features that match both the definition expression &lt;STRONG&gt;and&lt;/STRONG&gt; the query's where clause.&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 16:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660768#M61688</guid>
      <dc:creator>demdeberanz</dc:creator>
      <dc:date>2012-03-28T16:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer with Definition Expression and query features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660769#M61689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Songissimo, try using the selectFeatures function against your Feature Layer that you had previously applied setDefinitionExpression.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var select = featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);

select.then(function (features) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("select features result: ", features);
}

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I am using in my application do what you describe you are looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660769#M61689</guid>
      <dc:creator>ChadWilcomb</dc:creator>
      <dc:date>2021-12-12T03:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer with Definition Expression and query features</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660770#M61690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Songissimo, try using the selectFeatures function against your Feature Layer that you had previously applied setDefinitionExpression.&lt;BR /&gt;&lt;BR /&gt;Code:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var select = featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);

select.then(function (features) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("select features result: ", features);
}&lt;/PRE&gt;&lt;BR /&gt;This is what I am using in my application do what you describe you are looking for.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cwilcomb I'm glad to you&amp;nbsp; for both reply to my two posts. I've tested your solution but It doesn't behaves as I expected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It enquiries the layer but anyway it gives me all feature in the layer that match the specific clause (the one defined by query element) &lt;/SPAN&gt;&lt;STRONG&gt;instead of give only ones that match the specific condition that belong to the set selected with selectFeatures&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is very very strange, can it be a bug in the apis?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-with-definition-expression-and-query/m-p/660770#M61690</guid>
      <dc:creator>demdeberanz</dc:creator>
      <dc:date>2021-12-12T03:57:55Z</dc:date>
    </item>
  </channel>
</rss>

