<?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 Generating a choice list from a field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/generating-a-choice-list-from-a-field/m-p/284159#M21931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having problem generating a choice list from a field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran into this example: &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2011/08/25/Generating-a-choice-list-from-a-field-.aspx"&gt;http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2011/08/25/Generating-a-choice-list-from-a-field-.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I've tried it out and found out that this was what I needed. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So what i've done was edit the model with my own input feature class and so on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Though my first try was with a shapefile and it worked fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Second try was with a file geodatabase but here is where all my problems begin. (Don't have alot of python knowledge)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error that i'm getting is:&amp;nbsp;&amp;nbsp;&amp;nbsp; updateParameters Execution Error: Runtime error : FilterObject: illegal list value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After some troubleshooting I've found out that: The length of the field that i want to get the list from it it's too long. It's a text field and its length is 100.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I added a new field and set the length of it to 2 and calculated the values of the old field to the new one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this done it does run fine. But I want it for to run fine with a text field with a length 50.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I need to do with the validation code for it to run fine?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Feb 2012 11:40:41 GMT</pubDate>
    <dc:creator>DavidJosepha</dc:creator>
    <dc:date>2012-02-29T11:40:41Z</dc:date>
    <item>
      <title>Generating a choice list from a field</title>
      <link>https://community.esri.com/t5/python-questions/generating-a-choice-list-from-a-field/m-p/284159#M21931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having problem generating a choice list from a field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran into this example: &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2011/08/25/Generating-a-choice-list-from-a-field-.aspx"&gt;http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2011/08/25/Generating-a-choice-list-from-a-field-.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I've tried it out and found out that this was what I needed. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So what i've done was edit the model with my own input feature class and so on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Though my first try was with a shapefile and it worked fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Second try was with a file geodatabase but here is where all my problems begin. (Don't have alot of python knowledge)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error that i'm getting is:&amp;nbsp;&amp;nbsp;&amp;nbsp; updateParameters Execution Error: Runtime error : FilterObject: illegal list value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After some troubleshooting I've found out that: The length of the field that i want to get the list from it it's too long. It's a text field and its length is 100.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I added a new field and set the length of it to 2 and calculated the values of the old field to the new one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With this done it does run fine. But I want it for to run fine with a text field with a length 50.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I need to do with the validation code for it to run fine?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;David&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 11:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/generating-a-choice-list-from-a-field/m-p/284159#M21931</guid>
      <dc:creator>DavidJosepha</dc:creator>
      <dc:date>2012-02-29T11:40:41Z</dc:date>
    </item>
  </channel>
</rss>

