omega_cancer

Is this right way to pass multiple params to Asynch geoprocessing tool?

Discussion created by omega_cancer on May 24, 2016
Latest reply on May 25, 2016 by fcbassongis

I have a geoprocessing tool that accepts multiple input parameters, how to pass multiple parameters from javaScript.

 

     

    var param1 = {  
                    "Input_Layer": dijit.byId('spreadmodel1layers').value,  
                    "Start_locations": featureSet,  
                    "Default_break_values": box0.attr("value")  
                };

var param2 = {  
                    "Input_Layer": dijit.byId('spreadmodel2layers').value,  
                    "Start_locations": featureSet,  
                    "Default_break_values": box1.attr("value")  
                };
 
var params = [];
params.push(param1);
params.push(param2);
               
                esri.show(loading);  
                gp.submitJob(params, completeCallback, statusCallback, function(error){  
                    alert(error);  
                    esri.hide(loading);  
                });  

 

After submitting the job it comes back crying "Esri Job Failed".

I want to know that is it valid way to pass multiple parameters to Asynch GP tool.

Thanks

Outcomes