<?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 SQL settings for WhereClause in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sql-settings-for-whereclause/m-p/1150126#M7875</link>
    <description>&lt;P&gt;Good day,&lt;BR /&gt;I'm trying to figure out how to write an SQL query for SpatialQueryFilter in WhereClause, so that when browsing individual elements, it excludes the currently read element from the selection.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; private async Task DeletePolygonInPolygon(FeatureLayer polygonLayer)
        {
            var spatialQuery = new SpatialQueryFilter()
                    {  SpatialRelationship = SpatialRelationship.Contains };
                spatialQuery.WhereClause = "";//Somehow write down to keep it current because it would match
            polygonLayer.Select(spatialQuery);
            object[] listOfPara = { polygonLayer };
            await StartATask("management.DeleteFeatures", listOfPara);

        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 11:58:33 GMT</pubDate>
    <dc:creator>DavidMrázek</dc:creator>
    <dc:date>2022-03-03T11:58:33Z</dc:date>
    <item>
      <title>SQL settings for WhereClause</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sql-settings-for-whereclause/m-p/1150126#M7875</link>
      <description>&lt;P&gt;Good day,&lt;BR /&gt;I'm trying to figure out how to write an SQL query for SpatialQueryFilter in WhereClause, so that when browsing individual elements, it excludes the currently read element from the selection.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; private async Task DeletePolygonInPolygon(FeatureLayer polygonLayer)
        {
            var spatialQuery = new SpatialQueryFilter()
                    {  SpatialRelationship = SpatialRelationship.Contains };
                spatialQuery.WhereClause = "";//Somehow write down to keep it current because it would match
            polygonLayer.Select(spatialQuery);
            object[] listOfPara = { polygonLayer };
            await StartATask("management.DeleteFeatures", listOfPara);

        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 11:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/sql-settings-for-whereclause/m-p/1150126#M7875</guid>
      <dc:creator>DavidMrázek</dc:creator>
      <dc:date>2022-03-03T11:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL settings for WhereClause</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sql-settings-for-whereclause/m-p/1150199#M7876</link>
      <description>&lt;P&gt;I'm not near a computer to test anything, but from what I can see your going to want to add a for loop to the body of your function. For each feature in the featurelayer you pass into the function return the ObjectID (or other unique id). Then you can use that to exclude the current feature from the WhereClause.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 15:17:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/sql-settings-for-whereclause/m-p/1150199#M7876</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-03-03T15:17:02Z</dc:date>
    </item>
  </channel>
</rss>

