Interactively selecting shapefile from map service

Discussion created by dugtoni on Dec 4, 2012
Latest reply on Dec 13, 2012 by mmherp
Hey everyone,

I would really appreciate if someone could give me some help.  I have created some geoprocessing services which clip a particular raster dataset by a shapefile of interest.  I have imbedded this geoprocessing service in a map service, so in the web page there is a map with some shapefiles in it, and then on the side of the map there are the parameters that need to be specified to run the geoprocessing service.  One of these parameters is the shapefile which the user would like to clip the data by.  Instead of having to upload a shapefile into this parameter, I want the user to be able to click on a shapefile that is in the map service, and then the geoprocessing service will use this shapefile as the clipping extent.  I am not quite sure how to pass the shapefile the user clicks on to the gp service.  Is there some sort of onClick parameter for the shapefile that I need to create within the javascript?  Any help would be much appreciated.  Thank you!!