<?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>idea When arcpy.Parameter() multiValue is True, offer ability to return a List object in Developers Ideas</title>
    <link>https://community.esri.com/t5/developers-ideas/when-arcpy-parameter-multivalue-is-true-offer/idi-p/1244281</link>
    <description>&lt;P&gt;When a Parameter holds multiple values, it would be nice to be able to catch them in a simple list object instead of a String or ValueTable.&lt;/P&gt;&lt;P&gt;For example, given:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;param0 = arcpy.Parameter(
    displayName="Inputs",
    name="inputs",
    datatype="GPString",
    parameterType="Required",
    direction="Input",
    multiValue=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the user inputs multiple strings like "Orange", "Apple", "Banana" the current options are&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].valueAsText  # "Orange;Apple;Banana"&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].value  # &amp;lt;geoprocessing value table object&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;I would like to be able to return multiple values in a more idiomatic way:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].value  # yields simple list: ["Orange", "Apple", "Banana"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Yes, it is easy to do parameters[0].valueAsText.split(";") or search through a value table, but both approaches are a needless complication.&amp;nbsp; Getting a list directly from the Parameter seems to be the most straightforward, intuitive way to deal with multiple values.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2022 17:25:02 GMT</pubDate>
    <dc:creator>EricEagle</dc:creator>
    <dc:date>2022-12-29T17:25:02Z</dc:date>
    <item>
      <title>When arcpy.Parameter() multiValue is True, offer ability to return a List object</title>
      <link>https://community.esri.com/t5/developers-ideas/when-arcpy-parameter-multivalue-is-true-offer/idi-p/1244281</link>
      <description>&lt;P&gt;When a Parameter holds multiple values, it would be nice to be able to catch them in a simple list object instead of a String or ValueTable.&lt;/P&gt;&lt;P&gt;For example, given:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;param0 = arcpy.Parameter(
    displayName="Inputs",
    name="inputs",
    datatype="GPString",
    parameterType="Required",
    direction="Input",
    multiValue=True)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the user inputs multiple strings like "Orange", "Apple", "Banana" the current options are&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].valueAsText  # "Orange;Apple;Banana"&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].value  # &amp;lt;geoprocessing value table object&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;I would like to be able to return multiple values in a more idiomatic way:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].value  # yields simple list: ["Orange", "Apple", "Banana"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Yes, it is easy to do parameters[0].valueAsText.split(";") or search through a value table, but both approaches are a needless complication.&amp;nbsp; Getting a list directly from the Parameter seems to be the most straightforward, intuitive way to deal with multiple values.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 17:25:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/when-arcpy-parameter-multivalue-is-true-offer/idi-p/1244281</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2022-12-29T17:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: When arcpy.Parameter() multiValue is True, offer ability to return a List object</title>
      <link>https://community.esri.com/t5/developers-ideas/when-arcpy-parameter-multivalue-is-true-offer/idc-p/1244662#M1163</link>
      <description>&lt;P&gt;To flesh this out more, there ought to be a .valueAsTable property for when one wants to return the ValueTable object:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parameters[0].valueAsTable  # returns ValueTable&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 21:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-ideas/when-arcpy-parameter-multivalue-is-true-offer/idc-p/1244662#M1163</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2022-12-30T21:57:47Z</dc:date>
    </item>
  </channel>
</rss>

