Geoprocessing Task with No Parameters?

800
2
Jump to solution
10-03-2013 07:41 AM
ionarawilson1
Occasional Contributor III
Is it possible to run a geoprocessing service (gp task) in a web app without passing any parameters? If so how would I change the submitjob function to have no parameters

gp.submitJob(params, completeCallback , statusCallback,function(error){ //          alert(error);
0 Kudos
1 Solution

Accepted Solutions
RyanClancy
Occasional Contributor
I'm going to assume we're talking about the Javascript API. As per the API documentation, inputParameters are required for the submitJob method. If you don't want to pass anything you could just have
var inputParams = ""; gp.submitJob(inputParams.....


...provided that the corresponding GP service doesn't actually require any input parameters. In this case I suppose you'd have things like the input data parameter hardcoded into the underlying Python script?

View solution in original post

0 Kudos
2 Replies
RyanClancy
Occasional Contributor
I'm going to assume we're talking about the Javascript API. As per the API documentation, inputParameters are required for the submitJob method. If you don't want to pass anything you could just have
var inputParams = ""; gp.submitJob(inputParams.....


...provided that the corresponding GP service doesn't actually require any input parameters. In this case I suppose you'd have things like the input data parameter hardcoded into the underlying Python script?
0 Kudos
ionarawilson1
Occasional Contributor III
Thank you Ryan. I will try that. Yes, I have it coded in Python. I will also try submitting with one parameter. Thanks
0 Kudos