<?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: Python Toolboxes: Using a multiValue Parameter in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213876#M16486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"parameters[0].values" worked without a hitch.&amp;nbsp; All I had to do was set that equal to a variable name and then get the value in the list at the right index.&amp;nbsp; Thank you so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc_list = parameters[0].values
edit_fc = fc_list[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 10:29:40 GMT</pubDate>
    <dc:creator>ChanningDale</dc:creator>
    <dc:date>2021-12-11T10:29:40Z</dc:date>
    <item>
      <title>Python Toolboxes: Using a multiValue Parameter</title>
      <link>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213874#M16484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In a tool in my Python toolbox, I want to set one of my parameters to multiValue to let the user enter multiple input feature classes or layers. When I go to access the parameter value, I'm not sure what data type/object it's coming in as. I've seen conflicting information in the documentation, that it could be either a delimited string using a semi-colon, or it could be a list. Which one is it or is it something completely different? I've tried working with the parameter in both cases, and I get the same error. The error appears when I try to pass in one of the paths given to me through the parameter:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: Dataset '[path to feature class]' does not exist or is not supported&lt;BR /&gt;Failed to execute (MakeFeatureLayer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This tool &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;does&lt;/SPAN&gt;&lt;SPAN&gt; work if I don't have the parameter set to multiValue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Documentation I looked at (both in the custom toolbox and Python toolbox sections):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Defining_parameters_in_a_Python_toolbox/001500000028000000/" rel="nofollow" target="_blank"&gt;Defining Parameters in a Python toolbox&lt;/A&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Setting_script_tool_parameters/00150000000n000000/" rel="nofollow" target="_blank"&gt;Setting Script Tool Parameters&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thoughts? Help?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 14:53:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213874#M16484</guid>
      <dc:creator>ChanningDale</dc:creator>
      <dc:date>2012-09-24T14:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolboxes: Using a multiValue Parameter</title>
      <link>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213875#M16485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="font-family:Courier New;"&gt;.value&lt;/SPAN&gt;&lt;SPAN&gt; will be a semicolon delimited string. If you use the &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;.values&lt;/SPAN&gt;&lt;SPAN&gt; attribute (note the plural), it will be a list instead, which is likely what you want. We couldn't make &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;.value&lt;/SPAN&gt;&lt;SPAN&gt; return a list for backwards compatibility reasons.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 15:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213875#M16485</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-09-24T15:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolboxes: Using a multiValue Parameter</title>
      <link>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213876#M16486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"parameters[0].values" worked without a hitch.&amp;nbsp; All I had to do was set that equal to a variable name and then get the value in the list at the right index.&amp;nbsp; Thank you so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc_list = parameters[0].values
edit_fc = fc_list[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:29:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213876#M16486</guid>
      <dc:creator>ChanningDale</dc:creator>
      <dc:date>2021-12-11T10:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolboxes: Using a multiValue Parameter</title>
      <link>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213877#M16487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As a follow-on to this topic, I have a multivalue list and I want to test it for the number of selections made by the user.&amp;nbsp; If the user selects just one value, I want to enable some other Boolean controls.&amp;nbsp; If the user selects more than one, I want to disable those controls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I cannot get the Boolean controls to update as soon as I make a list selection.&amp;nbsp; I must click somewhere else on the form to get the controls to change status.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code where "feature_class" is my multivalue parameter and the other variables are my Boolean checkboxes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;def updateParameters(self, parameters):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]# Get inputs[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_biweekly = parameters[0][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_monthly = parameters[1][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_adhoc = parameters[2][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]feature_class = parameters[3][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_gisp = parameters[4][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_gis = parameters[5][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_gisw = parameters[6][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_countystore = parameters[7][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]update_cache = parameters[8][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]if update_adhoc.value:[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT]feature_class.enabled=True[/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]else:[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT]feature_class.enabled=False[/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]if feature_class.values:[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT]if len(feature_class.values) == 1:[/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gisp.enabled=True[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gis.enabled=True[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gisw.enabled=True[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_countystore.enabled=True[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_cache.enabled=True[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT]else:[/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gisp.enabled=False[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gis.enabled=False[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_gisw.enabled=False[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_countystore.enabled=False[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT][INDENT][INDENT]update_cache.enabled=False[/INDENT][/INDENT][/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]return[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on how to get my enabled status to change immediately upon clicking a value in the multivalue list?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Will&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 13:46:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-toolboxes-using-a-multivalue-parameter/m-p/213877#M16487</guid>
      <dc:creator>WillAllender</dc:creator>
      <dc:date>2013-03-15T13:46:23Z</dc:date>
    </item>
  </channel>
</rss>

