<?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 Wrong number of features result with QueryFeaturesAsync on a ServiceFeatureTable in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293400#M11857</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using ArcGIS Runtime 100.15.0 .NET SDK, and I'm querying a ServiceFeatureTable that contains polylines with a simple where clause (ID='xxx'). If I a test the query in a browser the result is ok, n features, but when I execute the same query in code I get less features than it would be expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe any relationship with the service?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.ServiceFeatureTable featureTable = new Esri.ArcGISRuntime.Data.ServiceFeatureTable(new Uri(uri));&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.QueryParameters queryParams = new Esri.ArcGISRuntime.Data.QueryParameters();&lt;/P&gt;&lt;P&gt;queryParams.WhereClause = strWhere;&lt;BR /&gt;queryParams.ReturnGeometry = true;&lt;/P&gt;&lt;P&gt;queryParams.OutSpatialReference = ControlObjMap.General.MapaActivoVGIS.ObjetoMapa.map1.SpatialReference;&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.FeatureQueryResult queryResult = await _featureTable.QueryFeaturesAsync(queryParams);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But also I tried this code with all parameters setted&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.ServiceFeatureTable feature_Pruebas =&lt;BR /&gt;new Esri.ArcGISRuntime.Data.ServiceFeatureTable(new Uri(uri));&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.QueryParameters queryParams_Pruebas = new Esri.ArcGISRuntime.Data.QueryParameters&lt;BR /&gt;{&lt;BR /&gt;MaxAllowableOffset=99999,&lt;BR /&gt;ResultOffset=10,&lt;BR /&gt;SpatialRelationship = Esri.ArcGISRuntime.Data.SpatialRelationship.Equals,&lt;BR /&gt;WhereClause = strWhere,&lt;BR /&gt;ReturnGeometry = true,&lt;BR /&gt;OutSpatialReference = ControlObjMap.General.MapaActivoVGIS.ObjetoMapa.map1.SpatialReference&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var taskQuery_Pruebas = feature_Pruebas.QueryFeaturesAsync(queryParams_Pruebas);&lt;BR /&gt;taskQuery_Pruebas.Wait();&lt;BR /&gt;Esri.ArcGISRuntime.Data.FeatureQueryResult queryResult_Pruebas = taskQuery_Pruebas.Result;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 10:49:09 GMT</pubDate>
    <dc:creator>VíctorAE</dc:creator>
    <dc:date>2023-05-26T10:49:09Z</dc:date>
    <item>
      <title>Wrong number of features result with QueryFeaturesAsync on a ServiceFeatureTable</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293400#M11857</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using ArcGIS Runtime 100.15.0 .NET SDK, and I'm querying a ServiceFeatureTable that contains polylines with a simple where clause (ID='xxx'). If I a test the query in a browser the result is ok, n features, but when I execute the same query in code I get less features than it would be expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe any relationship with the service?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.ServiceFeatureTable featureTable = new Esri.ArcGISRuntime.Data.ServiceFeatureTable(new Uri(uri));&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.QueryParameters queryParams = new Esri.ArcGISRuntime.Data.QueryParameters();&lt;/P&gt;&lt;P&gt;queryParams.WhereClause = strWhere;&lt;BR /&gt;queryParams.ReturnGeometry = true;&lt;/P&gt;&lt;P&gt;queryParams.OutSpatialReference = ControlObjMap.General.MapaActivoVGIS.ObjetoMapa.map1.SpatialReference;&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.FeatureQueryResult queryResult = await _featureTable.QueryFeaturesAsync(queryParams);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But also I tried this code with all parameters setted&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.ServiceFeatureTable feature_Pruebas =&lt;BR /&gt;new Esri.ArcGISRuntime.Data.ServiceFeatureTable(new Uri(uri));&lt;/P&gt;&lt;P&gt;Esri.ArcGISRuntime.Data.QueryParameters queryParams_Pruebas = new Esri.ArcGISRuntime.Data.QueryParameters&lt;BR /&gt;{&lt;BR /&gt;MaxAllowableOffset=99999,&lt;BR /&gt;ResultOffset=10,&lt;BR /&gt;SpatialRelationship = Esri.ArcGISRuntime.Data.SpatialRelationship.Equals,&lt;BR /&gt;WhereClause = strWhere,&lt;BR /&gt;ReturnGeometry = true,&lt;BR /&gt;OutSpatialReference = ControlObjMap.General.MapaActivoVGIS.ObjetoMapa.map1.SpatialReference&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var taskQuery_Pruebas = feature_Pruebas.QueryFeaturesAsync(queryParams_Pruebas);&lt;BR /&gt;taskQuery_Pruebas.Wait();&lt;BR /&gt;Esri.ArcGISRuntime.Data.FeatureQueryResult queryResult_Pruebas = taskQuery_Pruebas.Result;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 10:49:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293400#M11857</guid>
      <dc:creator>VíctorAE</dc:creator>
      <dc:date>2023-05-26T10:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong number of features result with QueryFeaturesAsync on a ServiceFeatureTable</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293461#M11858</link>
      <description>&lt;P&gt;Can you run fiddler to look at the query sent across?&amp;nbsp; Runtime is just a wrapper for the same rest calls made via a browser, so not sure why you would see a difference&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 13:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293461#M11858</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2023-05-26T13:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong number of features result with QueryFeaturesAsync on a ServiceFeatureTable</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293519#M11859</link>
      <description>&lt;P data-unlink="true"&gt;Inspecting fiddler capture will definitely help you troubleshoot whether the query you're making on the browser is identical to the request made through Runtime.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;In addition should they be different...&lt;/P&gt;&lt;P data-unlink="true"&gt;A quick check if you will need to use paging query is to &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.FeatureTable.QueryFeatureCountAsync.html" target="_self"&gt;FeatureTable.QueryFeatureCountAsync&lt;/A&gt;&amp;nbsp;if the result is more than the &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.ArcGISServices.ArcGISFeatureLayerInfo.MaxRecordCount.html" target="_self"&gt;LayerInfo.MaxRecordCount&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.ArcGISServices.ArcGISFeatureLayerInfo.SupportsPagination.html" target="_self"&gt;LayerInfo.SupportsPagination&lt;/A&gt; is true, you can pass a ResultOffset and MaxFeaturesCount in the QueryParameters. Another cause why query result count is different from server is you may have set a &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.ServiceFeatureTable.DefinitionExpression.html" target="_self"&gt;DefinitionExpression&lt;/A&gt; on the table which will limit the features accessible to you.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 16:31:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293519#M11859</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2023-05-26T16:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong number of features result with QueryFeaturesAsync on a ServiceFeatureTable</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293974#M11864</link>
      <description>&lt;P&gt;Fiddler showed me the difference. The problem is the result of the service which contains records with same ESRI_OID. In Runtime you cannot change "Return Distinct Values" (is set true), meanwhile in the browser default mode is false&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 08:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/wrong-number-of-features-result-with/m-p/1293974#M11864</guid>
      <dc:creator>VíctorAE</dc:creator>
      <dc:date>2023-05-30T08:04:41Z</dc:date>
    </item>
  </channel>
</rss>

