<?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: Geoprocessing Service using selected features in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1302163#M36295</link>
    <description>&lt;P&gt;Did you ever get an answer to this?&amp;nbsp; I have built a super simple proof of concept geoprocessing tool that should take a selection, buffer it and return the result to the map.&amp;nbsp; I cannot get it to take a feature set of selected features from the web application.&amp;nbsp; It either returns an empty output or buffers the whole feature class.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2023 18:32:41 GMT</pubDate>
    <dc:creator>allenjoones</dc:creator>
    <dc:date>2023-06-22T18:32:41Z</dc:date>
    <item>
      <title>Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1217481#M34130</link>
      <description>&lt;P&gt;I'm trying to create a geoprocessing service that consumes the selected features in a webmap.&amp;nbsp; I'm running it through the geoprocessing widget in a web app builder map.&amp;nbsp; My enterprise server is running Portal 11.0 with a Federated server, also at 11.0.&amp;nbsp; I'm publishing from ArcGIS Pro 3.0.2.&lt;/P&gt;&lt;P&gt;The geoprocessing service is a python toolbox function with two parameters - an input layer, and an output spreadsheet&amp;nbsp; The parameters looks like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def getParameterInfo(self):
        """Define parameter definitions"""
        p0 = arcpy.Parameter(displayName="Parcel Layer", name="parcellayer", direction="Input", datatype="GPFeatureLayer", parameterType="Required")
        p1 = arcpy.Parameter(displayName="Owner List", name="ownerlist", direction="Output", datatype="DEFile", parameterType="Derived")
        return [p0, p1]&lt;/LI-CODE&gt;&lt;P&gt;The execute function looks like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def execute(self, parameters, messages):
        """The source code of the tool."""
        fl = parameters[0].valueAsText
        fc = arcpy.management.CopyFeatures(fl, os.path.join(arcpy.env.scratchGDB, "SelectedParcels"))
        with arcpy.da.SearchCursor(fc, ("roll",)) as sc:
            rolls = [row[0] for row in sc]
        powners, aowners = get_owner_info(rolls)
        xlname = "OwnerList_%s.xlsx" % datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
        xlpth = os.path.join(arcpy.env.scratchFolder, xlname)
        make_excel(xlpth, powners, aowners)
        parameters[1].value = xlpth
        return&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tool works perfectly when run in ArcGIS Pro, and publishes to the portal without errors.&amp;nbsp; When published, the first parameter is set to "User Defined", so that I get a dropdown list to select the layer from the webmap.&amp;nbsp; When I run the geoprocessing service published directly from the python toolbox, the selection in the webmap isn't utilized, and the output spreadsheet is comprised of &lt;STRONG&gt;all&lt;/STRONG&gt; of the features from input layer.&lt;/P&gt;&lt;P&gt;I've tried checking the box "Do not send URL but FeatureCollections as input" in the geoprocessing widget, but it makes no difference, the service uses all features.&lt;/P&gt;&lt;P&gt;I've tried running it both with and without the CopyFeatures line in the execute function, but it makes no difference, the service uses all features.&lt;/P&gt;&lt;P&gt;Is there any way to make my python toolbox, published as a geoprocessing service, utilize the selection in the webmap?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 16:25:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1217481#M34130</guid>
      <dc:creator>RobMcCulley</dc:creator>
      <dc:date>2022-09-29T16:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1302163#M36295</link>
      <description>&lt;P&gt;Did you ever get an answer to this?&amp;nbsp; I have built a super simple proof of concept geoprocessing tool that should take a selection, buffer it and return the result to the map.&amp;nbsp; I cannot get it to take a feature set of selected features from the web application.&amp;nbsp; It either returns an empty output or buffers the whole feature class.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 18:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1302163#M36295</guid>
      <dc:creator>allenjoones</dc:creator>
      <dc:date>2023-06-22T18:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1345874#M37596</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/548318"&gt;@allenjoones&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/36830"&gt;@RobMcCulley&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did either of you find a resolution to this?&lt;/P&gt;&lt;P&gt;I want to use selected features of a feature layer as input to a geoprocessing service.&lt;/P&gt;&lt;P&gt;Could it have been an Experience Builder vs Web AppBuilder thing? Bug? Not supported?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Any info would be fantastic. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 12:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1345874#M37596</guid>
      <dc:creator>Zartico-GIS</dc:creator>
      <dc:date>2023-11-04T12:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1361599#M38013</link>
      <description>&lt;P&gt;Sooooo did anyone get any solutions for this? Also experiencing similar problem.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 19:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1361599#M38013</guid>
      <dc:creator>Juan_Toro-Killion</dc:creator>
      <dc:date>2023-12-15T19:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1361601#M38014</link>
      <description>&lt;P&gt;I haven't found a solution for this.&lt;/P&gt;&lt;P&gt;In the end, I converted my python toolbox to a model builder tool, and it works as expected.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 19:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1361601#M38014</guid>
      <dc:creator>RobMcCulley</dc:creator>
      <dc:date>2023-12-15T19:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1496948#M39847</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;when you say it works after you converted to a model builder, did you share your model builder as a geoprocessing service, or just use it as a toolbox ?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 04:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1496948#M39847</guid>
      <dc:creator>PierreloupDucroix</dc:creator>
      <dc:date>2024-06-25T04:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service using selected features</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1610063#M42115</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/36830"&gt;@RobMcCulley&lt;/a&gt;Did you ever figure this out? I'm not entirely sure if it is a limitation of Web App Builder, but it could be. I would suggest trying to set your first parameter to use the FeatureSet type instead, which I think should recognize the selected features. I haven't tried this myself, but it may be worth a shot if you've not already attempted it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 16:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-service-using-selected-features/m-p/1610063#M42115</guid>
      <dc:creator>__JackCharde__</dc:creator>
      <dc:date>2025-04-29T16:39:55Z</dc:date>
    </item>
  </channel>
</rss>

