<?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: Using Multivalue Inputs List in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508340#M16913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I was able to solve my problem by using t = i.replace("'", "") which removes the ' everywhere allowing the tool to accept the input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I still find it strange that the TableToTable tool won't accept the input as is with ' around it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2011 05:49:16 GMT</pubDate>
    <dc:creator>DanikBourdeau</dc:creator>
    <dc:date>2011-10-12T05:49:16Z</dc:date>
    <item>
      <title>Using Multivalue Inputs List</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508339#M16912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having issues trying to get a list of multivalue input working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tbl = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wrksp = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for i in tbl.split(";"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.TableToTable_conversion(i, wrksp, "temp1.dbf")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the script will always crash saying the dataset does not exist.&amp;nbsp; The reason being is that the string returned has ' ' around it so the path name is not right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody know a work around?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S.&amp;nbsp; How do I put my code above in a special box like everyone else seems to do?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 03:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508339#M16912</guid>
      <dc:creator>DanikBourdeau</dc:creator>
      <dc:date>2011-10-12T03:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Multivalue Inputs List</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508340#M16913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I was able to solve my problem by using t = i.replace("'", "") which removes the ' everywhere allowing the tool to accept the input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I still find it strange that the TableToTable tool won't accept the input as is with ' around it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 05:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508340#M16913</guid>
      <dc:creator>DanikBourdeau</dc:creator>
      <dc:date>2011-10-12T05:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Multivalue Inputs List</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508341#M16914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Well, I was able to solve my problem by using t = i.replace("'", "") which removes the ' everywhere allowing the tool to accept the input.&lt;BR /&gt;&lt;BR /&gt;But I still find it strange that the TableToTable tool won't accept the input as is with ' around it.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a problem with the text representation of the parameter. Each entry in the list is quoted to ensure it can be somehow parsed, though if the there was a ';' in any of the inputs I'm thinking it would break the python .split().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A safer way to unpack a list of values is to bypass the string representation using GetParameter() instead of GetParameterAsText. Then instead of a string you get a value table which can then be parsed using the value table object methods:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000q1000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000q1000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there's a new arcpy way to do it that's better, someone please chime in!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 15:10:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508341#M16914</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-10-12T15:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Multivalue Inputs List</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508342#M16915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;BR /&gt;P.S.&amp;nbsp; How do I put my code above in a special box like everyone else seems to do?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a button when you are replying that looks like # it will put [noparse]&lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&lt;/PRE&gt;&lt;SPAN&gt;[/noparse] tags around your selected text.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 15:22:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-multivalue-inputs-list/m-p/508342#M16915</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2011-10-12T15:22:33Z</dc:date>
    </item>
  </channel>
</rss>

