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.
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:
reload(arcpy)
arcpy.ResetEnvironments()
arcpy.env.overwriteOutput = True
I am using arcpy.GetParameterAsText and arcpy.SetParameterAsText but I don't know any other way to Reset Parameters.
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?
Thanks in advance for any tips.