Returning a table from Geoprocessing Service

683
5
07-07-2012 09:43 PM
JoeHershman
MVP Regular Contributor
I think this is probably really simple to do but I cannot seem to figure out how to return a table from a Geoprocessing service.  My service creates a table and I want to return that to the caller.  Documentation indicates a table can be used as the return value and AGS will convert it to a FeatureSet to return.  I have tried numerous incarnations of SetParameter or SetParameterAsText with different values as the return parameter and keep getting

RuntimeError>Object:Error Setting Parameter (or Parameter as Text)

Can anyone post a sample of how I would return a table from my scratch workspace as the result of a GP Service

Thanks
-Joe
Thanks,
-Joe
Tags (2)
0 Kudos
5 Replies
KevinBell
Occasional Contributor III
BUMP!

I'd really like a sample too!  I have a table in a fgdb that needs to be graphed on the client...
0 Kudos
NilsBabel
Occasional Contributor II
I think this is probably really simple to do but I cannot seem to figure out how to return a table from a Geoprocessing service.  My service creates a table and I want to return that to the caller.  Documentation indicates a table can be used as the return value and AGS will convert it to a FeatureSet to return.  I have tried numerous incarnations of SetParameter or SetParameterAsText with different values as the return parameter and keep getting

RuntimeError>Object:Error Setting Parameter (or Parameter as Text)

Can anyone post a sample of how I would return a table from my scratch workspace as the result of a GP Service

Thanks
-Joe


Hi Joe.  Did you ever figure this out?  I'm having the same problem.  I have a script that creates a table as an output in the scratch workspace.  I know the script works correctly because I can see the output table in the jobs folder.  But the service will not return the table.  When it gets to the final step I get an error that says the job failed because of crash or termination of the server object.  I have tried setting an output parameter with a default value and GetParameterAsText, a derived table and SetParameterAsText, and a derived recordset with SetParameterAsText.  I even put my script in a model and published that.  Same result every time.  The geprocessing service examples are nice but can you actually get GP services to work with your own solution?
0 Kudos
GrantHaynes
Occasional Contributor

I stumbled upon this thread and am trying to do the same thing, has anyone here figured this out?

0 Kudos
JoeHershman
MVP Regular Contributor

I am guessing I ended up using a non-python approach, but I can barely remember what I did Monday let alone in 2012

Thanks,
-Joe
0 Kudos
GrantHaynes
Occasional Contributor

No worries.

0 Kudos