<?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: Unknown number of parameters in script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301695#M68010</link>
    <description>&lt;P&gt;Value tables are kind of a pain, but they can definitely simplify your input a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1687369975901.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73836iFBACB0B0DACD4A2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1687369975901.png" alt="AlfredBaldenweck_0-1687369975901.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_1-1687370053245.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73838i4CD349140ABC0445/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_1-1687370053245.png" alt="AlfredBaldenweck_1-1687370053245.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to give you a tool validation example on filtering, but it's giving me issues today.&lt;/P&gt;&lt;P&gt;It's hard to say without seeing your tool, but I think they're worth investigating&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2023 18:33:08 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2023-06-21T18:33:08Z</dc:date>
    <item>
      <title>Unknown number of parameters in script</title>
      <link>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301486#M68004</link>
      <description>&lt;P&gt;I'm creating a set of scripts with tens of input parameters. First 5 are paths to databases, network datasets etc. Next 3 specify what type of analysis should be calculated. So first 8 parameters are set and defined. Additionally parameters&amp;nbsp; 8-40 (for now) are optional booleans which specify what region or district should be calculated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is, that the script reads definition in database, where it is specified what should happen for said region/district. Therefore user adds new optional parametr as boolean dynamically with the same name as specified in DB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a clean solution to iterate number of parameters, read their name and value and then run analysis based on what is preapred in DB?&lt;/P&gt;&lt;P&gt;I need not to do arcpy.GetParameterAsText(xx), because that would force change of script. I also need to know the parameter name to find correct definition in DB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any ideas!&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 13:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301486#M68004</guid>
      <dc:creator>MartinPorteš</dc:creator>
      <dc:date>2023-06-21T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown number of parameters in script</title>
      <link>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301494#M68005</link>
      <description>&lt;P&gt;Is it possible to instead have a few multivalue parameters whose options change based on previous answers?&lt;/P&gt;&lt;P&gt;40 parameters is a LOT.&lt;/P&gt;&lt;P&gt;Like, are you basically asking the same questions over and over again for each region/district, and that's why you need so many?&lt;/P&gt;&lt;P&gt;If that's the case, I'd look into &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameters-in-a-python-toolbox.htm#ESRI_SECTION1_E2BAA5D4440D41D6AAB948922186905A" target="_blank" rel="noopener"&gt;value table parameters&lt;/A&gt;, as well as play around with &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/understanding-validation-in-script-tools.htm" target="_blank" rel="noopener"&gt;tool validation&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 13:41:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301494#M68005</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-21T13:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown number of parameters in script</title>
      <link>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301672#M68009</link>
      <description>&lt;P&gt;Hi, I don't think so. Or I don't fully understand to your idea.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that 40 is extreme, but the user is able to choose predefined tasks (so in the 40 "regions" are at the moment 15 analysis). So grouping is possible, but I need to clearly know what region should be calculated. Problem is, that the amount of analysis can grow and the same thing can happen to the regions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to allow the user to prepare new region, but not necessary to go in script and add new arcpy.GetParamAsText(46)...&lt;BR /&gt;I will look into value table and into tool valudations. I always ignored theese, since I struggled to understand the composition/definition of them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, thank you for the idea.&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 17:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301672#M68009</guid>
      <dc:creator>MartinPorteš</dc:creator>
      <dc:date>2023-06-21T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unknown number of parameters in script</title>
      <link>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301695#M68010</link>
      <description>&lt;P&gt;Value tables are kind of a pain, but they can definitely simplify your input a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1687369975901.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73836iFBACB0B0DACD4A2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1687369975901.png" alt="AlfredBaldenweck_0-1687369975901.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_1-1687370053245.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73838i4CD349140ABC0445/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_1-1687370053245.png" alt="AlfredBaldenweck_1-1687370053245.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I wanted to give you a tool validation example on filtering, but it's giving me issues today.&lt;/P&gt;&lt;P&gt;It's hard to say without seeing your tool, but I think they're worth investigating&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 18:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unknown-number-of-parameters-in-script/m-p/1301695#M68010</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-06-21T18:33:08Z</dc:date>
    </item>
  </channel>
</rss>

