<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: model builder and user input in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202826#M6912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right now I have a SELECTION in my Model...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a FC that is being selected and an Expression that is prompting the user for an input (query builder pops up) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of the Query Builder and the Expression I simply want a form to popup with a drop down to allow the user to select and then have it build the query itself...then pass this to the SELECTION as the existing Expression is doing....hope that makes sense&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I script a form or popup in model builder asking for user input?&amp;nbsp; Examples?&amp;nbsp; Documentation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jan 2014 16:34:48 GMT</pubDate>
    <dc:creator>jaykapalczynski</dc:creator>
    <dc:date>2014-01-16T16:34:48Z</dc:date>
    <item>
      <title>model builder and user input</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202825#M6911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a model that is working fine...the user is asked to select a county but out of the box its using the Query Builder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to change this and have a form popup with a drop down box with the County names...then use that selection as the input variable to some other function later in the model like a clip or something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can this be done?&amp;nbsp; Any examples or documentation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 16:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202825#M6911</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2014-01-16T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: model builder and user input</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202826#M6912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right now I have a SELECTION in my Model...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a FC that is being selected and an Expression that is prompting the user for an input (query builder pops up) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of the Query Builder and the Expression I simply want a form to popup with a drop down to allow the user to select and then have it build the query itself...then pass this to the SELECTION as the existing Expression is doing....hope that makes sense&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I script a form or popup in model builder asking for user input?&amp;nbsp; Examples?&amp;nbsp; Documentation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 16:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202826#M6912</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2014-01-16T16:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: model builder and user input</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202827#M6913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to dynamically populate a picklist, that can be done by modifying the tool validation script (script tool properties, validation tab).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basic example of generating a list of unique values for a picklist:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;class ToolValidator:
 """Class for validating a tool's parameter values and controlling
 the behavior of the tool's dialog."""
 def __init__(self):
&amp;nbsp; """Setup the Geoprocessor and the list of tool parameters."""
&amp;nbsp; self.params = arcpy.GetParameterInfo()
&amp;nbsp; 
 def initializeParameters(self):
&amp;nbsp; """Refine the properties of a tool's parameters.&amp;nbsp; This method is
&amp;nbsp; called when the tool is opened."""
&amp;nbsp; return
 def updateParameters(self):
&amp;nbsp; """Modify the values and properties of parameters before internal
&amp;nbsp; validation is performed.&amp;nbsp; This method is called whenever a parameter
&amp;nbsp; has been changed."""
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FC = r"C:\Path\To\FeatureClass"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col = "FieldName"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[0].filter.list = [str(val) for val in sorted(set(row.getValue(Col) for row in arcpy.SearchCursor(FC, None, None, Col)))]&amp;nbsp;&amp;nbsp; #use a da cursor if @ 10.1+ 
&amp;nbsp; return
 def updateMessages(self):
&amp;nbsp; """Modify the messages created by internal validation for each tool
&amp;nbsp; parameter.&amp;nbsp; This method is called after internal validation."""
&amp;nbsp; return 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202827#M6913</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2021-12-11T10:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: model builder and user input</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202828#M6914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not really following that....can you explain a bit further...little green here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a string variable and pointed that to the expression...although it will take multiple entries 'test1', 'test2'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it is not a drop down box....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the expression I add this to point to the variable I String created...can I create a variable that is a drop down box with a list of values of which I can select more than one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;County_Nam in (%Name Of County Being Used For Search%)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:33:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202828#M6914</guid>
      <dc:creator>jaykapalczynski</dc:creator>
      <dc:date>2014-01-16T17:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: model builder and user input</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202829#M6915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;On second examination, I'm not sure the solution I provided would work for what you need. I was talking about making it so a tool's dialog would dynamically populate a picklist when you open the tool. You're looking for something that pops up in the middle of the workflow, not first thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure whether or not that can be done in model builder. I think it might be possible if you made it a python addin tool, but again, I don't have any experience with that, so I'm not sure.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 15:00:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/model-builder-and-user-input/m-p/202829#M6915</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2014-01-24T15:00:24Z</dc:date>
    </item>
  </channel>
</rss>

