I set up a model that shall use an attribute field from a given feature class as a parameter. The feature class is a model parameter by itself and I want the user to choose the feature class first and then one attribute field from the ones contained within this chosen feature class. The only working way right now is to type the correct field name, but what if the user does not know the name and just wants to choose from a list? This is my model with the input mask:
enter image description here enter image description here
I want the "Dissolve Field" to be a list of all available attributes from the input polygons, but I get an empty dropdown, since I don't know how to tell the model to read all field names and parse them to the dropdown menu.
This is specifically for using the model builder, NOT for a python script, where I know that you can do stuff like this with the "Validation" tab in the properties.
Using field parameters in calculate field is not exactly what I'm looking for, if I got the question right.
1 Answer 1
I've manage to do that through this workaround (see images below):
Note: You can access the Get Field Value Tool through Insert> Model Only Tools
-
Eureka! :) Could you edit your answer, showing that you have to connect "Value" (the outcome of "Get Field Value") with "Dissolve" instead of "Dissolve Field"? At least that's what worked for me, not exactly the way you drew it up.s6hebern– s6hebern2018年02月22日 14:02:01 +00:00Commented Feb 22, 2018 at 14:02
-
I believe that would depend if your "Dissolve tool" would expect the name of the field or the actual value of the field for a given record. I assumed that you needed the name of the field.Carlos MSF– Carlos MSF2018年02月22日 17:46:38 +00:00Commented Feb 22, 2018 at 17:46
-
You are absolutely right, sorry for the confusions6hebern– s6hebern2018年02月23日 07:13:42 +00:00Commented Feb 23, 2018 at 7:13
Explore related questions
See similar questions with these tags.