<?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 QueryFilter PostFix Clause Not Working With Shapefiles in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1342987#M10611</link>
    <description>&lt;P&gt;Hi all, first post here so let me know if I filled this out wrong.&lt;BR /&gt;&lt;BR /&gt;I am working on an add-in that uses the postfix clause of a queryfilter to order the results. I ran into a bug where a feature layer sourced from a shapefile doesnt sort correctly or at all (just returns rows in order of object id when my postfix was for a different column ascending). When I saved the same feature layer to a geodatabase and added it back into the project, the postfix clause worked just as expected (sorted correctly).&lt;BR /&gt;&lt;BR /&gt;Here was the code block in question:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var queryFilter = new QueryFilter
{
    WhereClause = $"{treeLayerInfoFields["objectid"]} IN ({string.Join(",", batch)})",
    PostfixClause = $"ORDER BY {treeLayerInfoFields["dbh_in"]} ASC",
};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Has anyone else ran into shapefile-sourced feature layers not working when querying with a postfix clause?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 22:47:47 GMT</pubDate>
    <dc:creator>estz2</dc:creator>
    <dc:date>2023-10-27T22:47:47Z</dc:date>
    <item>
      <title>QueryFilter PostFix Clause Not Working With Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1342987#M10611</link>
      <description>&lt;P&gt;Hi all, first post here so let me know if I filled this out wrong.&lt;BR /&gt;&lt;BR /&gt;I am working on an add-in that uses the postfix clause of a queryfilter to order the results. I ran into a bug where a feature layer sourced from a shapefile doesnt sort correctly or at all (just returns rows in order of object id when my postfix was for a different column ascending). When I saved the same feature layer to a geodatabase and added it back into the project, the postfix clause worked just as expected (sorted correctly).&lt;BR /&gt;&lt;BR /&gt;Here was the code block in question:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var queryFilter = new QueryFilter
{
    WhereClause = $"{treeLayerInfoFields["objectid"]} IN ({string.Join(",", batch)})",
    PostfixClause = $"ORDER BY {treeLayerInfoFields["dbh_in"]} ASC",
};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Has anyone else ran into shapefile-sourced feature layers not working when querying with a postfix clause?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 22:47:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1342987#M10611</guid>
      <dc:creator>estz2</dc:creator>
      <dc:date>2023-10-27T22:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: QueryFilter PostFix Clause Not Working With Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1343101#M10612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Shapefiles have some limitations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DISTINCT, ORDER BY, and ALL are only supported when working with databases. They are not supported by other data sources (such as dBASE or INFO tables).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/searchcursor-class.htm" target="_blank"&gt;SearchCursor—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You could try to use Table method &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic19998.html" target="_self"&gt;Sort.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2023 07:10:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1343101#M10612</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-10-29T07:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: QueryFilter PostFix Clause Not Working With Shapefiles</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1343329#M10618</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 15:43:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/queryfilter-postfix-clause-not-working-with/m-p/1343329#M10618</guid>
      <dc:creator>estz2</dc:creator>
      <dc:date>2023-10-30T15:43:52Z</dc:date>
    </item>
  </channel>
</rss>

