I am trying to create a drop-down list containing all the values from a particular field, that I can use as an input for the Select by Attributes tool in ModelBuilder.
The answer I’ve seen to similar questions is to hard-code the list using the String Variable.
i.e. Right-click in white space > Create Variable… > String > Choose to Model Parameter > Model > Model Properties… > make String filter = Value List > enter values one by one > Then use %String% as an in-line variable in a tool expression.
However, as the field is regularly updated by other people, I don’t want to hard-code any values.
Is there any way that I can perhaps, iterate through a layer (called "Boundary") and collect the values from a given field ([Name] field) as a String or Value(?) that can be used as an in-line variable in another tool, with ModelBuilder (or with Python script)?
The outcome being a drop-down list filled with values from the Boundary layer's [Name] field in the Select by Attributes tool.