I have a Geoprocessing Service - GetRouteMeasure. I want to allow the user to select different layers to process in the service via a drop down list on my widget. The drop down list needs to be populated by the Choice List for the input parameter Input_Discipline as shown below e.g. Pipelines, Roads etc. Is there a way to do this?
Thank you
Solved! Go to Solution.
I still haven't completely got there, but for anyone interested to access the ChoiceList I have put the following in the initialise function followed by the result handler below.
var taskinfoRequest:JSONTask = new JSONTask(); var urlVars:URLVariables = new URLVariables(); urlVars.f = "json"; taskinfoRequest.url = gp.url; taskinfoRequest.execute(urlVars, new AsyncResponder(taskinfoRequest_resultHandler, taskinfoRequest_faultHandler)); private function taskinfoRequest_resultHandler(taskInfo:Object, token:Object=null):void { var List:String = JSON.stringify(taskInfo.parameter[2].choiceList); Alert.show(List); }
I still haven't completely got there, but for anyone interested to access the ChoiceList I have put the following in the initialise function followed by the result handler below.
var taskinfoRequest:JSONTask = new JSONTask(); var urlVars:URLVariables = new URLVariables(); urlVars.f = "json"; taskinfoRequest.url = gp.url; taskinfoRequest.execute(urlVars, new AsyncResponder(taskinfoRequest_resultHandler, taskinfoRequest_faultHandler)); private function taskinfoRequest_resultHandler(taskInfo:Object, token:Object=null):void { var List:String = JSON.stringify(taskInfo.parameter[2].choiceList); Alert.show(List); }