AnsweredAssumed Answered

Python toolbox tool with GPFeatureLayer input as geprocessing service

Question asked by blake.terhune Champion on Jul 17, 2019

I'm creating a Python toolbox and want to host one of the tools as a geoprocessing service (ArcGIS 10.5.1). The required input is a GPFeatureLayer. The output is a CSV file to arcpy.env.scratchFolder, which ends up being the output directory of the service when published.

 

The end user needs to run the script in ArcMap and choose an input layer that has a selection of features. This works fine as a local Python toolbox. However, when published as a service (using the "User defined value" as the parameter's input mode), the default value is a ScratchRecordSet layer that gets added to the map with a name like ToolName::parameter_name. Is there a way to prevent this ScratchRecordSet layer from appearing?

 

ArcGIS Enterprise

Outcomes