<?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: Create Definition Query in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060596#M61198</link>
    <description>&lt;P&gt;It's related to some preprocessing work they are trying to do for a JS app.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/count-points-in-polygon-and-symbolize-on-number-of-occurrences/m-p/1059845#M73202" target="_blank"&gt;Count Points in Polygon and symbolize on number of... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 19:59:55 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2021-05-21T19:59:55Z</dc:date>
    <item>
      <title>Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060578#M61196</link>
      <description>&lt;P&gt;I am trying to figure out how to create a Definition query and run some code against those records&lt;/P&gt;&lt;P&gt;How do I create the Definition Query from the species name passed to this function?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Points = r"E:/xxxx/ArcGIS/Projects/UserFrontEnd/xxx@server.sde/TestLocations"

def unique_values(table, field):
    species = field
    expressionValue = "common_name = '{}'".format(species)

    # CREATE DEFINTION QUERY FOR COMMON_NAME
        Points Feature Class EQUAL TO the ExpressionValue
    # RUN SOME CODE AGAINST THE RESULTING RECORDS FROM THE DEFINITION QUERY
        Grab the resulting Point records and do something
        &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 19:22:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060578#M61196</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-05-21T19:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060589#M61197</link>
      <description>&lt;P&gt;definition queries work on layers.&amp;nbsp; What's with the function with a table parameter? Am confused on the detail of this tbh.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 19:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060589#M61197</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-21T19:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060596#M61198</link>
      <description>&lt;P&gt;It's related to some preprocessing work they are trying to do for a JS app.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/count-points-in-polygon-and-symbolize-on-number-of-occurrences/m-p/1059845#M73202" target="_blank"&gt;Count Points in Polygon and symbolize on number of... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 19:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060596#M61198</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-05-21T19:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060600#M61199</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/50919"&gt;@jaykapalczynski&lt;/a&gt;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/count-points-in-polygon-and-symbolize-on-number-of-occurrences/m-p/1060493/highlight/true#M73243" target="_self"&gt;I mentioned before&lt;/A&gt; that using Dissolve seems like it would get you the output you want. Have you tried that?&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 20:05:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060600#M61199</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-05-21T20:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060778#M61210</link>
      <description>&lt;P&gt;Thanks, I will look at the dissolve...&lt;/P&gt;&lt;P&gt;I just do not see where I apply the Polygon Feature Class and the Point Feature Class&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 12:29:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060778#M61210</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-05-23T12:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create Definition Query</title>
      <link>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060932#M61219</link>
      <description>&lt;P&gt;OK I posted my solution on another post...&lt;/P&gt;&lt;P&gt;I think you all for your thoughts....it got me through this one....&lt;/P&gt;&lt;P&gt;I used a Select instead and then used those results to update the polygon with counts&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/count-points-in-polygon-and-symbolize-on-number-of-occurrences/td-p/1059845/page/2#M73258" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-javascript/count-points-in-polygon-and-symbolize-on-number-of-occurrences/td-p/1059845/page/2#M73258&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:22:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-definition-query/m-p/1060932#M61219</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2021-05-24T13:22:23Z</dc:date>
    </item>
  </channel>
</rss>

