<?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: Controlling Parameter Visibility in python script tool with Batch Mode in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557507#M73174</link>
    <description>&lt;P&gt;Anecdotally, I've never gotten this to work. The best I can do is change one of the input parameters to multivalue.&lt;/P&gt;&lt;P&gt;Not sure if there's official documentation out there about this, but I don't think they considered matching in user-made tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2024 14:31:10 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2024-11-12T14:31:10Z</dc:date>
    <item>
      <title>Controlling Parameter Visibility in python script tool with Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557141#M73169</link>
      <description>&lt;P&gt;Dear GIS folks,&amp;nbsp;I recently developed a Python script tool in ArcGIS Pro 3.3, which includes 10 parameters. In the standard user interface (non-batch mode), I added some validation lines to streamline the tool’s usability: by default, only three parameters are visible initially. The first parameter allows users to select files, while the other two are checkboxes that, when selected, reveal additional sub-parameters for specific workflows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DasheEbra_1-1731247763102.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/119226iC6852CDF75221E5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DasheEbra_1-1731247763102.png" alt="DasheEbra_1-1731247763102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything works smoothly in single-mode, but I’m encountering an issue in Batch mode. In Batch mode, &lt;EM&gt;all&lt;/EM&gt; parameters are displayed at once, unlike the streamlined view in the regular UI. After extensively searching Esri’s help documentation and Esri community, I couldn’t find a solution to replicate the same functionality in Batch mode.&lt;/P&gt;&lt;P&gt;I even reviewed the Esri GP tool "Convert Labels to Annotation" which has a similar configuration (parameters toggled based on checkboxes). However, this tool also displays all parameters in Batch mode, ignoring the checkbox-based parameter toggling.&lt;/P&gt;&lt;P&gt;Could anyone share insights or solutions on achieving selective parameter visibility in Batch mode, or is this functionality not feasible?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Nov 2024 14:09:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557141#M73169</guid>
      <dc:creator>DasheEbra</dc:creator>
      <dc:date>2024-11-10T14:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Parameter Visibility in python script tool with Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557507#M73174</link>
      <description>&lt;P&gt;Anecdotally, I've never gotten this to work. The best I can do is change one of the input parameters to multivalue.&lt;/P&gt;&lt;P&gt;Not sure if there's official documentation out there about this, but I don't think they considered matching in user-made tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 14:31:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557507#M73174</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2024-11-12T14:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Parameter Visibility in python script tool with Batch Mode</title>
      <link>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557715#M73176</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;,&amp;nbsp;unfortunately I ended up addressing the issue using a multi-value selection within the parameter. This approach lead me to update the main code, where I wrote two additional functions to manage this, along with handling the validation part also. I'm hoping we'll see some useful updates related to this functionality in the future.&lt;/P&gt;&lt;P&gt;On a related note, I also managed to handle the parameter using Batch mode, but it currently works for parameter values only. Which I wrote a validation step that ensures when the end user provides two required parameters, the last three parameters are automatically set to %Name% or %Name% + 'any other value', which seems to work well for now. And here's snippet of the validation part&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if not self.params[2].altered:
    self.params[2].value = "%Name%" if self.params[7].value else sanitized_name  # Output dataset name
else:
    self.params[2].value = self.params[2].value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 19:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/controlling-parameter-visibility-in-python-script/m-p/1557715#M73176</guid>
      <dc:creator>DasheEbra</dc:creator>
      <dc:date>2024-11-12T19:41:06Z</dc:date>
    </item>
  </channel>
</rss>

