AnsweredAssumed Answered

Python Toolbox - user select from domain values

Question asked by ramstyler on Sep 20, 2018
Latest reply on Sep 20, 2018 by rvburton

I have a feature class. One of the fields is a Short Integer e.g. STATE. There is a domain (domain codes) that maps Short Integer to String values e.g. STATE_VALUES: 1 = New, 2 = Validated, 3 = Published. The STATE field in the feature class is linked to the domain. It operates as expected e.g. set state to integer values and via the Attribute Table view in ArcMap, see the associated state value.

 

I have a Python Toolbox. When the user opens one of the functions, the user specifies various parameters and then proceeds to execute the function. One of the parameters is to provide a state. At the moment, the user needs to type in the integer value (e.g. 1,2,3), which requires them to know the integer values but it would be better if they are presented with a list of values to choose from (e.g. New, Validated, Published).

 

Reviewing various documentation and other online resources, it isn't obvious if and how it could be done. GPValueTable seemed like a good option for the parameter type but it didn't give what was required.

 

Any suggestions or resources?

 

Greatly appreciate the help.

Outcomes