How to display several layers using a published GP tool - Error: Invalid return value

Discussion created by liliana.diaz-esri-se-esridist on Sep 22, 2010
Latest reply on Sep 23, 2010 by liliana.diaz-esri-se-esridist
I'm trying to publish a simple GP model that clips all the layers of a GeoDB based on a polygon drawn by the user and adds the clipped layers to the view. The model works fine when I run it in Desktop but once it's published in Server (either as a GPService or GPService with a result map service (mxd with a tool  layer) it gives me the error:  Error: Invalid return value: %scratchworkspace%\scracth.gdb\Clip_%Name%

I have successfully run the model for ONE layer but once I add the "Iterate Feature Classes" that  takes all the layers of the DB, it doesn't work (when it's published). I know there are restrictions in the type of output parameters for web application clients but how can I make the display of these clipped layers on a published GPservice possible?

Thank you for all your ideas...