<?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 Reset parameters for published web tool using arcpy script? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reset-parameters-for-published-web-tool-using/m-p/1268738#M67131</link>
    <description>&lt;P&gt;I have a web tool created from a model and a python script (imported into arcpro) which I am publishing to portal to be used in a web map. The tool runs with an input parameter which is an in-memory feature set (a point on the map clicked by the user). It uses the map coordinates to fetch some information and works great on the first click. But I have not been able to find a way to reset the tool so that if the user then clicks on a second point the coordinates will change -- the info returned continues to be from the first point.&lt;/P&gt;&lt;P&gt;In the script, I am deleting my python objects, deleting my searchcursor and rows, but have not been successful. I am also using the following in my script:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reload&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ResetEnvironments&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;overwriteOutput&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am using arcpy.GetParameterAsText and arcpy.SetParameterAsText but I don't know any other way to Reset Parameters.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is this even possible for a web tool using a map click input in this fashion? The ArcPro interface for running a geoprocessing tool has a separate button (on the Run button dropdown) for "Reset Parameters." But how to do this in the web environment for a user wanting to use the tool multiple times in a web map?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance for any tips.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 16 Mar 2023 20:00:57 GMT</pubDate>
    <dc:creator>EMiller_2</dc:creator>
    <dc:date>2023-03-16T20:00:57Z</dc:date>
    <item>
      <title>Reset parameters for published web tool using arcpy script?</title>
      <link>https://community.esri.com/t5/python-questions/reset-parameters-for-published-web-tool-using/m-p/1268738#M67131</link>
      <description>&lt;P&gt;I have a web tool created from a model and a python script (imported into arcpro) which I am publishing to portal to be used in a web map. The tool runs with an input parameter which is an in-memory feature set (a point on the map clicked by the user). It uses the map coordinates to fetch some information and works great on the first click. But I have not been able to find a way to reset the tool so that if the user then clicks on a second point the coordinates will change -- the info returned continues to be from the first point.&lt;/P&gt;&lt;P&gt;In the script, I am deleting my python objects, deleting my searchcursor and rows, but have not been successful. I am also using the following in my script:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reload&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ResetEnvironments&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;overwriteOutput&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am using arcpy.GetParameterAsText and arcpy.SetParameterAsText but I don't know any other way to Reset Parameters.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is this even possible for a web tool using a map click input in this fashion? The ArcPro interface for running a geoprocessing tool has a separate button (on the Run button dropdown) for "Reset Parameters." But how to do this in the web environment for a user wanting to use the tool multiple times in a web map?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance for any tips.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:00:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reset-parameters-for-published-web-tool-using/m-p/1268738#M67131</guid>
      <dc:creator>EMiller_2</dc:creator>
      <dc:date>2023-03-16T20:00:57Z</dc:date>
    </item>
  </channel>
</rss>

