I am creating a very basic model tool for a class project and I am running into trouble getting the SQL values to populate. I have read the ArcGIS 10: How to populate SQL options for parameter in tool post. If I need to convert this model into a script tool I can but I was wondering if I can change something in the model before attempting to make it a script. here is a screen shot of the model. Basically I just want the user to be able to open the SQL builder and select NAME = "" but the values and fields are not populated I noticed in the other post you can specify to populate from another parameter in the script. Is there anyway to do this in the model if not what would I set as my feature parameter if I created a script. As you may have guessed I am a beginner with python and model builder so I appologize if this is a "dumb question". here is a screen shot of the layers att table if that helps
-
is name a domain field? if not I think you will have to build your own available value list.– Brad NesomCommented Sep 30, 2013 at 18:24
-
@Brad Nesom I dont think it is, its just a field of county names would I use the collect values tool to build a available values list?– landocalrissianCommented Sep 30, 2013 at 18:38
-
Can you include in your question a graphic of the Parameters tab of your model with the NAME field highlighted so we can see its settings, please? It looks like you may have it set to a data type of SQL Expression rather than Field.– PolyGeo ♦Commented Sep 30, 2013 at 22:20
-
@PolyGeo good idea Im not in the lab now but I will post in the morning thanks for the help so far.– landocalrissianCommented Oct 1, 2013 at 0:38
-
@PolyGeo I have attached a screenshot of my parameters tab it is set as an SQL should it be set to something else I thought since the parameter is a variable from the select tools SQL option.– landocalrissianCommented Oct 1, 2013 at 13:03
|
Show 1 more comment
1 Answer
One of my previous questions regarding building value list filters in modelbuilder may help.
This will allow the user to choose from a list of available options you have built into the parameter/model.
-
1funny because I stumbled across your post about 30 minutes ago and it definatley helped I changed the select your AP County to a string variable with the the counties as a value list filter and used the "NAME" = '%Select your AP Counties%' for the SQL query in the select tool. I also did the same for the Aquatic Preserves parameter and it works now. Thanks all for the help I would vote this answer but I cant due to my lowly status. Commented Oct 1, 2013 at 16:05
-
-
@ChrisR you should be able to upvote this answer so perhaps try again– PolyGeo ♦Commented Oct 1, 2013 at 19:25
-
@PolyGeo at the time I couldn't but now I can and have. Thanks again Commented Oct 3, 2013 at 12:06