I am new to ArcGIS Server. I have a Python script tool that I've published as a geoprocessing service.
The script takes a point feature class, writes a subset of the input FC as a new FC in the scratchworkspace, creates some new fields and calculates values for these fields based on user input parameters.
The service and all of the calculations the script is performing, works fine - I can go into the scratch workspace on the server, find the unique job ID folders, and see my results.
Eventually, I want to consume it via the Flex API, but for now, I am trying to get it working by consuming it in ArcMap Desktop.
My problem is getting these results loaded into the map. I've followed the advice given in response to this question. I've added an output parameter, tried to load the results as a FeatureSet and set the output parameter to be the FeatureSet.
When I do this using the following code, I get an error that I "cannot load table into a FeatureSet". This doesn't add up because my output is a point feature class (I have confirmed this by looking at it in the scratchworkspace on the server).
result = "%scratchworkspace%\Scratch.gdb\output"
res = "in_memory/result"
r = arcpy.CreateObject("FeatureSet")
r.load(res)
arcpy.SetParameter(9, r)
Any advice or direction would be appreciated. Thanks, -Erik