<?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: How to show different options in Script Tool when selecting different options? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7340#M604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thanks for the reply Jake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would need to edit the code in the Validation tab?&lt;/P&gt;&lt;P&gt;see image.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/442558_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Apr 2019 14:11:24 GMT</pubDate>
    <dc:creator>deleted-user-yC5VkbyXzrQR</dc:creator>
    <dc:date>2019-04-22T14:11:24Z</dc:date>
    <item>
      <title>How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7338#M602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering how I can give different GetParameteres when a certain variable is true.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For ex.&amp;nbsp;&lt;BR /&gt;If a feature class has more than 1 feature in it I want it to use a different GP tool. I know I can do this in the script easily but I want users to enter in parameters in if the feature class has more than 1 feature in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/442552_pic1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 02:15:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7338#M602</guid>
      <dc:creator>deleted-user-yC5VkbyXzrQR</dc:creator>
      <dc:date>2019-04-22T02:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7339#M603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to apply &lt;A href="http://desktop.arcgis.com/en/arcmap/10.6/analyze/creating-tools/understanding-validation-in-script-tools.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Script Tool Validation&lt;/A&gt; to the tool.&amp;nbsp; Take a look at the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.6/analyze/creating-tools/customizing-script-tool-behavior.htm#ESRI_SECTION1_33B6C154C73C477FBF8C4AAEAEA097B9" title="http://desktop.arcgis.com/en/arcmap/10.6/analyze/creating-tools/customizing-script-tool-behavior.htm#ESRI_SECTION1_33B6C154C73C477FBF8C4AAEAEA097B9" rel="nofollow noopener noreferrer" target="_blank"&gt;Customizing script tool behavior—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could specify something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;updateParameters&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7339#M603</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T20:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7340#M604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thanks for the reply Jake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would need to edit the code in the Validation tab?&lt;/P&gt;&lt;P&gt;see image.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/442558_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 14:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7340#M604</guid>
      <dc:creator>deleted-user-yC5VkbyXzrQR</dc:creator>
      <dc:date>2019-04-22T14:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7341#M605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/230680"&gt;Adam Arcichowski&lt;/A&gt;‌ yes that is correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 14:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7341#M605</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2019-04-22T14:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7342#M606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jake,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I think of it, I'm not sure if this will work because the&amp;nbsp; "&lt;CODE style="border: 0px; font-weight: inherit;"&gt;arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;GetCount_management" will not work on a kmz correct?&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;If I select a kmz with multiple features in it, can the Validation script run to convert the kmz to a feature layer than use the GetCount function and then have the other parameters come up ?&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2019 15:01:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7342#M606</guid>
      <dc:creator>deleted-user-yC5VkbyXzrQR</dc:creator>
      <dc:date>2019-04-22T15:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to show different options in Script Tool when selecting different options?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7343#M607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It can, but you may want to be careful with this approach.&amp;nbsp; From the &lt;A href="http://desktop.arcgis.com/en/arcmap/10.6/analyze/creating-tools/customizing-script-tool-behavior.htm"&gt;help&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Called each time the user changes a parameter on the tool dialog box. After returning from updateParameters, geoprocessing calls its internal validation routine.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will want to make sure the tool is not running the KMZ conversion after each parameter is updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2019 17:28:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-show-different-options-in-script-tool-when/m-p/7343#M607</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2019-04-23T17:28:28Z</dc:date>
    </item>
  </channel>
</rss>

