<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GP widget does not accept Multivalue parameter, but job thru REST does...why? syn in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387363#M11145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a working example using a multivalue parameter with Flex and AGS 10.0 (just the applicable code shown).&amp;nbsp; Layoutelements is the multivalue parameter.&amp;nbsp; I have not been able to get it to function under 10.1 because as far as I can tell the only way to create a service now is to run it from the Desktop, but the Desktop won't allow entry of a multivalue parameter (at least it won't for me because it just grays out the add value button, so if you figure out a workaround for that, let me know.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Flex portion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private var printUtil:PrintUtil;
printUtil =&amp;nbsp; new PrintUtil(map);

printUtil.LayoutElements = [title,author,locateCoordinateString];


var params:Object = printUtil.getPrintParameters();

exportMapGP.submitJob(params);


 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;esri:Geoprocessor id="exportMapGP" url="{gpServiceURL}" /&amp;gt;
 &amp;lt;/fx:Declarations&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Python portion.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Create a dictionary with the element name and element value
&amp;nbsp;&amp;nbsp;&amp;nbsp; elemSettings = params.get_layoutelements()
&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary = dict({})
&amp;nbsp;&amp;nbsp;&amp;nbsp; for subnode in elementNode:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemName = subnode.attrib["name"] 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemSettings.getRow(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue[1:]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue[:-1]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue.replace("*","\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = i + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(elemName + ": " + elemValue)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if elemValue:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary[elemName] = elemValue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(elemName + ": " + elemValue)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:47:39 GMT</pubDate>
    <dc:creator>NeoGeo</dc:creator>
    <dc:date>2021-12-11T17:47:39Z</dc:date>
    <item>
      <title>GP widget does not accept Multivalue parameter, but job thru REST does...why? syntax?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387362#M11144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a GP widget that allows a user to select data layers to be clipped and zipped to a particular extent, in my case, by county. I can successfully have this GP service run if i submit the job through the REST endpoint. I have to submit my layers with the following syntax for my 'layers_to_clip' parameter: ['Layer1','Layer2']. The parameter that selects the county, based on an input list, passes fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to run the GP service in Flex through the GP widget, it returns an error. My config file has multivalue:string (something I found the hard way) with a choicelist of layers. When I select more than one layer in my Flex widget interface, I get the error "Problem esriJobFailed Failed." message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The messages XML in the failed job folder has the Layers_to_Clip input parameter as follows: "Layers to Clip: Dataset 'Layer1';'Layer2' does not exist or is not supported". which leads me to believe that the Flex GP widget does not use the correct syntax to pass a multivalue string list. Can anyone confirm this? How can I get around this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FWIW, I can get the widget to 'work' if I only select one layer from&amp;nbsp; my list. I say 'work' in quotes since I still cannot see/save my output ZIP file. But I will tackle that issue when I can successfully select more than one layer to download.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Charlene&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 17:13:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387362#M11144</guid>
      <dc:creator>C_EHoward</dc:creator>
      <dc:date>2012-08-30T17:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: GP widget does not accept Multivalue parameter, but job thru REST does...why? syn</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387363#M11145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a working example using a multivalue parameter with Flex and AGS 10.0 (just the applicable code shown).&amp;nbsp; Layoutelements is the multivalue parameter.&amp;nbsp; I have not been able to get it to function under 10.1 because as far as I can tell the only way to create a service now is to run it from the Desktop, but the Desktop won't allow entry of a multivalue parameter (at least it won't for me because it just grays out the add value button, so if you figure out a workaround for that, let me know.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Flex portion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private var printUtil:PrintUtil;
printUtil =&amp;nbsp; new PrintUtil(map);

printUtil.LayoutElements = [title,author,locateCoordinateString];


var params:Object = printUtil.getPrintParameters();

exportMapGP.submitJob(params);


 &amp;lt;fx:Declarations&amp;gt;
&amp;nbsp; &amp;lt;esri:Geoprocessor id="exportMapGP" url="{gpServiceURL}" /&amp;gt;
 &amp;lt;/fx:Declarations&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the Python portion.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Create a dictionary with the element name and element value
&amp;nbsp;&amp;nbsp;&amp;nbsp; elemSettings = params.get_layoutelements()
&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary = dict({})
&amp;nbsp;&amp;nbsp;&amp;nbsp; for subnode in elementNode:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemName = subnode.attrib["name"] 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemSettings.getRow(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue[1:]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue[:-1]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elemValue = elemValue.replace("*","\n")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = i + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(elemName + ": " + elemValue)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if elemValue:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary[elemName] = elemValue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(elemName + ": " + elemValue)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:47:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387363#M11145</guid>
      <dc:creator>NeoGeo</dc:creator>
      <dc:date>2021-12-11T17:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: GP widget does not accept Multivalue parameter, but job thru REST does...why? syn</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387364#M11146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the code. I got it to work in 10.....have not attempted at 10.1 yet. I had to move onto other things, but I will be revisiting this, so they better make sure all available parameters in 10 are there in 10.1. I am not holding my breath however since it usually takes users trying to do their work to expose shortcomings&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 13:58:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/gp-widget-does-not-accept-multivalue-parameter-but/m-p/387364#M11146</guid>
      <dc:creator>C_EHoward</dc:creator>
      <dc:date>2013-09-05T13:58:36Z</dc:date>
    </item>
  </channel>
</rss>

