<?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 10.2 problem with ArcGISFeatureLayer queryFeatures() in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/10-2-problem-with-arcgisfeaturelayer-queryfeatures/m-p/381102#M2582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is for an ArcGISFeatureLayer that was initialized using a layer definition and feature set rather than a URL, and I think something must have changed with the way queries work in the new API. In the previous API version the following code worked as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a feature layer with a few hundred graphics, and I'm trying to query one based on an ObjectID. The following code returns a null feature set even though a graphic with the ObjectID value exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Query query = new Query();
query.setWhere("OBJECTID = 1");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact, it looks like ANY where clause returns a null feature set. Even "1 = 1".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I set the geometry in addition to the where clause, I get all 400 graphics returned and the where clause is ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Query query = new Query();
query.setWhere("OBJECTID = 1");
query.setGeometry(mapView.getExtent());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I loop through the features I can find the one with the ObjectID that I want, and that will be my workaround for now, but I don't understand while simply using setWhere() no longer works and why the where clause is ignored when setGeometry() is used.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Nov 2013 22:05:38 GMT</pubDate>
    <dc:creator>JasonKnisley</dc:creator>
    <dc:date>2013-11-14T22:05:38Z</dc:date>
    <item>
      <title>10.2 problem with ArcGISFeatureLayer queryFeatures()</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/10-2-problem-with-arcgisfeaturelayer-queryfeatures/m-p/381102#M2582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is for an ArcGISFeatureLayer that was initialized using a layer definition and feature set rather than a URL, and I think something must have changed with the way queries work in the new API. In the previous API version the following code worked as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a feature layer with a few hundred graphics, and I'm trying to query one based on an ObjectID. The following code returns a null feature set even though a graphic with the ObjectID value exists.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Query query = new Query();
query.setWhere("OBJECTID = 1");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact, it looks like ANY where clause returns a null feature set. Even "1 = 1".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I set the geometry in addition to the where clause, I get all 400 graphics returned and the where clause is ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Query query = new Query();
query.setWhere("OBJECTID = 1");
query.setGeometry(mapView.getExtent());&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I loop through the features I can find the one with the ObjectID that I want, and that will be my workaround for now, but I don't understand while simply using setWhere() no longer works and why the where clause is ignored when setGeometry() is used.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 22:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/10-2-problem-with-arcgisfeaturelayer-queryfeatures/m-p/381102#M2582</guid>
      <dc:creator>JasonKnisley</dc:creator>
      <dc:date>2013-11-14T22:05:38Z</dc:date>
    </item>
  </channel>
</rss>

