Generating a choice list from a field

280
0
02-29-2012 03:40 AM
DavidJosepha
New Contributor
Hi there,

I'm having problem generating a choice list from a field.

I ran into this example: http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2011/08/25/Generating-a-choice-list-from-a-fie...

And I've tried it out and found out that this was what I needed.
So what i've done was edit the model with my own input feature class and so on.
Though my first try was with a shapefile and it worked fine.
Second try was with a file geodatabase but here is where all my problems begin. (Don't have alot of python knowledge)

The error that i'm getting is:    updateParameters Execution Error: Runtime error : FilterObject: illegal list value
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.
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.
With this done it does run fine. But I want it for to run fine with a text field with a length 50.

Is there something I need to do with the validation code for it to run fine?

Please help.

Regards,
David
Tags (2)
0 Kudos
0 Replies