Select to view content in your preferred language

GP widget multivalue parameter type not supported?

2439
1
Jump to solution
07-17-2012 06:10 AM
C_EHoward
Frequent Contributor
I am trying to create my own data download GP service to use with the GP widget in the sample 3.0 Flex viewer. I created a model in ArcMap and created a GP service from the model that is in my toolbox. The model works fine in ArcMap.  I am using the sample 'GeoprocessingWidget_ExtractData' XML as my guide and plugging in my parameters from my model. My model does use the 'extract data' script from the examples. Basically I want to allow users to select a bunch of layers to be clipped by a county boundaries layer (bonus if I could select specific counties from this layer) and then be assembled in a GDB and zip file. Just about the same as the example but slightly more straightforward.

When I try and use my GP service with Flex, neither my XML nor the sample XML works with the Geoprocessing widget. When I open my app in the App Builder, I notice the multivalue parameter that selects my data layers to download has a 'type not supported' comment. So why does this example XML contain the multivalue if it doesn't work? How can I otherwise specify multiple layers to download, clip and zip into a GDB as the example does?

I do not want to use the Data Extract widget that relies on the clip and ship- I wanted to specify the layers I used in my model, and extract data widget doesn't  seem to allow anything but following the clip-n-ship. Any ideas appreciated.

Charlene
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
C_EHoward
Frequent Contributor
Ok, welwell I think I figured this problem out.....but not without some investigative reporting.

Seems the 'Multivalue' parameter type available for use in widgets has been renamed to Multivalue:string.....this is at least as far as the GP example for 'Extract Data' is concerned. This syntax was not updated in the GeoprocessingWidget_ExtractData.xml provided in the 3.0 sample viewer, at least the last time I checked.

To find the correct syntax I had to load the sample 3.0 into the app builder. Before that I made the 'config-all' XML file the main config file so I could see the GP widget. I then changed the GP task for the widget to the one that is in the GeoprocessingWidget_ExtractData.xml file. Lo and behold, in the list of parameters, the type said multivalue:string. I plugged that into my custom GP widget XML and voila, I could see my list of layers to select for download. Now if I can get back the 'jobfailed' error I will be good to go.

I tried the GP widgets on the sample page here http://resources.arcgis.com/en/help/flex-viewer/live/index.html?config=apps/config-geoprocessing.xml, and the extract data task does not work...I do feel a bit satisfied that it was not my syntax that was the issue.

Anyway, I hope this information helps others trying to cobble together their own functionality based on the compiled viewer. What is frustrating is that there seems to be no reference as to what is possible in widgets (and I am talking GP specific for now) unless there happens to be a sample XML. And when the sample is flawed, you spend days banging your head. I am sure I am not the only person out there that is limited to using the compiled viewer to make web apps that can be customized as much as possible. More references, examples, etc. would be helpful, as would making sure the samples provided work 😉

Charlene

View solution in original post

0 Kudos
1 Reply
C_EHoward
Frequent Contributor
Ok, welwell I think I figured this problem out.....but not without some investigative reporting.

Seems the 'Multivalue' parameter type available for use in widgets has been renamed to Multivalue:string.....this is at least as far as the GP example for 'Extract Data' is concerned. This syntax was not updated in the GeoprocessingWidget_ExtractData.xml provided in the 3.0 sample viewer, at least the last time I checked.

To find the correct syntax I had to load the sample 3.0 into the app builder. Before that I made the 'config-all' XML file the main config file so I could see the GP widget. I then changed the GP task for the widget to the one that is in the GeoprocessingWidget_ExtractData.xml file. Lo and behold, in the list of parameters, the type said multivalue:string. I plugged that into my custom GP widget XML and voila, I could see my list of layers to select for download. Now if I can get back the 'jobfailed' error I will be good to go.

I tried the GP widgets on the sample page here http://resources.arcgis.com/en/help/flex-viewer/live/index.html?config=apps/config-geoprocessing.xml, and the extract data task does not work...I do feel a bit satisfied that it was not my syntax that was the issue.

Anyway, I hope this information helps others trying to cobble together their own functionality based on the compiled viewer. What is frustrating is that there seems to be no reference as to what is possible in widgets (and I am talking GP specific for now) unless there happens to be a sample XML. And when the sample is flawed, you spend days banging your head. I am sure I am not the only person out there that is limited to using the compiled viewer to make web apps that can be customized as much as possible. More references, examples, etc. would be helpful, as would making sure the samples provided work 😉

Charlene
0 Kudos