Geoprocessor with Output of type GPDataFile - How to provide a value

3291
1
11-02-2010 06:20 AM
DeonaEvans
New Contributor
I have a GP tool that has an output parameter of type GPDataFile.  There is a default value for this but I want to change it.  How do I make the call in the flex api to set a new value.  In the parameter object I tried this:

"Output_Zip_File": "myZip.zip"

But this gives an error "Invalid value for parameter" which makes sense since I'm providing a string and it's wanting a GPDataFile.  So, how do I do this?  Or can I?
Tags (2)
0 Kudos
1 Reply
MelonyBarrett
New Contributor III
Is this a clip and ship service?  Are you using the Data Extract Widget or similar?  Are you simply trying to change the name of the zipfile returned to the user?  If so, then you can supply a different name for the zip file in the downloadFile function.
   private function downloadFile(url:String):void
   {
    var downloadURL:URLRequest = new URLRequest();
    downloadURL.url = url;
    file = new FileReference();
    configureListeners(file);
                                //change the name of the zipfile below
    file.download(downloadURL, "moBetterZipFileName.zip");
   }


Another way to change this is to go back to the geoprocessing model and change the Output Zip File parameter there.
0 Kudos