Select to view content in your preferred language

Need help with trying to save a file through a geoprocess in Flex

610
1
08-09-2013 10:17 AM
JohnCarr2
Deactivated User
I have a script that works well in desktop but when I publish it and add it into the Flex Viewer as a widget it does not work the same way that it does in desktop. Basically, the script runs through a bunch of queries on a feature in a database, puts values in an excel file and saves it wherever the user specifies. This is where I am stuck.

In desktop when I run the script, I have an input parameter set up (data type is set as "Folder") that will ask the user where he/she wants to save the file. So you click on the folder and navigate to the drive/folder you wish to save the file. Once the user specifies that, the script is off and running. In Flex when you click on the widget to run the script, it will run but it never asks the user where to save the file at. So, its creating the excel file I am assuming but I need to figure out how to get Flex to open a save file dialogue box so the user can navigate to their desired save location. This can happen either at the beginning or end of the script it doesnt matter to me. Is this possible? Any ideas?


Also as a side note...when I publish the script and look at its widget settings, it shows that I have no inputs, even though I clearly have one specified when I am running this in desktop. I dont know if this is contributing to the problem but if anyone can explain that to me also that would be helpful. Thanks.
Tags (2)
0 Kudos
1 Reply
JoeHewitt
Regular Contributor
Take a look at the Export to Shapefile widget, it has a function that opens the dialog box prompting the user to select where to save a file, which should help you implementing where to place it.

http://www.arcgis.com/home/item.html?id=d8dc9df78ec643a9a27c18a6f01b41c1

The  private function doDownload() the function I'm referring to.
0 Kudos