Select to view content in your preferred language

GetParameterAsText - List of Value

3654
2
09-25-2014 08:38 PM
MittRamgobin
Deactivated User

Hi,

 

I want to define a list of values for a Parameter as all the values for a particular field in a Feature Class.

 

How do I do that?

0 Kudos
2 Replies
RiyasDeen
Frequent Contributor

Hi Mitt,

I doubt you can define a parameter as values in a field. You can pass a shapefile and field as input parameter.

Refer this blog Create a list of unique field values | ArcPy Café  , get a list of values in your script and loop through the values.

DarrenWiens2
MVP Honored Contributor

You should be able to use Tool Validation for this. Also, see here for a working example, employing an arcpy.da.SearchCursor.