<?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 New Geoprocessing job includes previous feature selection in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/new-geoprocessing-job-includes-previous-feature/m-p/288763#M11047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a geoprocessing service that allows the user to draw a route to download pdf files&amp;nbsp;via a zip file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The process is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The user draws the route (polyline) of interest (interactive feature set input)&lt;/P&gt;&lt;P&gt;2) The route is buffered to 100 feet&lt;/P&gt;&lt;P&gt;3) The 100 foot buffer is used to select features from 4 different polyline layers&lt;/P&gt;&lt;P&gt;4) (PYTHON MAGIC) arcpy.SearchCursor() is used to extract the pdf file ID (ex. &lt;STRONG&gt;S-0123&lt;/STRONG&gt;.pdf) from each selected feature&lt;/P&gt;&lt;P&gt;5) The file IDs are appended to a python list. The list is used to search, copy, and zip the pdf files from our archive.&lt;/P&gt;&lt;P&gt;6) A "file" output link is presented to download the zip file containing the pdf files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a screenshot of the model corresponding to the process above.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475457" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/475457_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The GP Service runs on our Web Application and the output looks like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475458" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/475458_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;I do not know why the previous selections are remaining.&amp;nbsp; I clear cache and hard reload and this still happens.&amp;nbsp; It does not happen when I run the GP tool in ArcMap prior to publishing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using arcpy.env.ScratchFolder to allow for the "FILE" datatype output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone had any similar issues with GP Services selecting features?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Using the rubber ducky method, I believe I've found the solution.&amp;nbsp; The problem seemed to be that the layers were not being deselected between every job in the web application like they were in ArcMap.&amp;nbsp; So I had added "Select by Attribute" tools to my model using the "CLEAR SELECTION" option. This ensures that any current selection is cleared prior to&amp;nbsp;the "NEW SELECTION" taking place.&lt;/P&gt;&lt;P&gt;Model looks like this now:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475553" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/475553_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Dec 2019 23:57:33 GMT</pubDate>
    <dc:creator>ChazOlloqui</dc:creator>
    <dc:date>2019-12-05T23:57:33Z</dc:date>
    <item>
      <title>New Geoprocessing job includes previous feature selection</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/new-geoprocessing-job-includes-previous-feature/m-p/288763#M11047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a geoprocessing service that allows the user to draw a route to download pdf files&amp;nbsp;via a zip file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The process is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The user draws the route (polyline) of interest (interactive feature set input)&lt;/P&gt;&lt;P&gt;2) The route is buffered to 100 feet&lt;/P&gt;&lt;P&gt;3) The 100 foot buffer is used to select features from 4 different polyline layers&lt;/P&gt;&lt;P&gt;4) (PYTHON MAGIC) arcpy.SearchCursor() is used to extract the pdf file ID (ex. &lt;STRONG&gt;S-0123&lt;/STRONG&gt;.pdf) from each selected feature&lt;/P&gt;&lt;P&gt;5) The file IDs are appended to a python list. The list is used to search, copy, and zip the pdf files from our archive.&lt;/P&gt;&lt;P&gt;6) A "file" output link is presented to download the zip file containing the pdf files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a screenshot of the model corresponding to the process above.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475457" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/475457_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The GP Service runs on our Web Application and the output looks like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475458" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/475458_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;I do not know why the previous selections are remaining.&amp;nbsp; I clear cache and hard reload and this still happens.&amp;nbsp; It does not happen when I run the GP tool in ArcMap prior to publishing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using arcpy.env.ScratchFolder to allow for the "FILE" datatype output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone had any similar issues with GP Services selecting features?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Using the rubber ducky method, I believe I've found the solution.&amp;nbsp; The problem seemed to be that the layers were not being deselected between every job in the web application like they were in ArcMap.&amp;nbsp; So I had added "Select by Attribute" tools to my model using the "CLEAR SELECTION" option. This ensures that any current selection is cleared prior to&amp;nbsp;the "NEW SELECTION" taking place.&lt;/P&gt;&lt;P&gt;Model looks like this now:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="475553" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/475553_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Dec 2019 23:57:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/new-geoprocessing-job-includes-previous-feature/m-p/288763#M11047</guid>
      <dc:creator>ChazOlloqui</dc:creator>
      <dc:date>2019-12-05T23:57:33Z</dc:date>
    </item>
  </channel>
</rss>

