<?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: Populate two columns of a value table parameter with field names derived from two other parameters in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1331925#M73385</link>
    <description>&lt;P&gt;Figured it out. I'd set the individual column data types to field when they should have been strings then set the filter. Validation code below does the job.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_0-1695645025731.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81520iE32202C0DFC04FFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_0-1695645025731.png" alt="MattHowe_0-1695645025731.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_1-1695645051831.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81521i6B9549531FCA37BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_1-1695645051831.png" alt="MattHowe_1-1695645051831.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def updateParameters(self):
        # Modify parameter values and properties.
        # This gets called each time a parameter is modified, before 
        # standard validation.
        if self.params[0].altered and self.params[0].value:
            source_field_list = [f.name for f in arcpy.ListFields(self.params[0].value)]
            self.params[2].filters[0].list = source_field_list
            
        if self.params[1].altered and self.params[1].value:
            target_field_list = [f.name for f in arcpy.ListFields(self.params[1].value)]
            self.params[2].filters[1].list = target_field_list
        return&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 12:31:58 GMT</pubDate>
    <dc:creator>MattHowe</dc:creator>
    <dc:date>2023-09-25T12:31:58Z</dc:date>
    <item>
      <title>Populate two columns of a value table parameter with field names derived from two other parameters</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1331885#M73382</link>
      <description>&lt;P&gt;I'd like to populate two columns of a table of values string parameter in a custom Python tool (non Python toolbox) with fields names from two other parameters. In the example, the first column would have a list of fields from parameter 0, and the second column a list of fields from parameter 1. I only have the option of choosing one dependency in the parameter list (of which works great) but I also need the other parameter. How should Value Table parameters be handled in the validation script so each column's filter list can be defined?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_0-1695634269795.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81509iC2A5FB19EE9425FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_0-1695634269795.png" alt="MattHowe_0-1695634269795.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def updateParameters(self):
        # Modify parameter values and properties.
        # This gets called each time a parameter is modified, before 
        # standard validation.
        if self.params[0].altered and self.params[0].value:
            source_field_list = [f.name for f in arcpy.ListFields(self.params[0].value)]
        if self.params[1].altered and self.params[1].value:
            target_field_list = [f.name for f in arcpy.ListFields(self.params[1].value)]      
        return&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gets the two field lists but just need to figure out how to give them as options in both columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 09:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1331885#M73382</guid>
      <dc:creator>MattHowe</dc:creator>
      <dc:date>2023-09-25T09:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Populate two columns of a value table parameter with field names derived from two other parameters</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1331925#M73385</link>
      <description>&lt;P&gt;Figured it out. I'd set the individual column data types to field when they should have been strings then set the filter. Validation code below does the job.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_0-1695645025731.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81520iE32202C0DFC04FFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_0-1695645025731.png" alt="MattHowe_0-1695645025731.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_1-1695645051831.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81521i6B9549531FCA37BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_1-1695645051831.png" alt="MattHowe_1-1695645051831.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def updateParameters(self):
        # Modify parameter values and properties.
        # This gets called each time a parameter is modified, before 
        # standard validation.
        if self.params[0].altered and self.params[0].value:
            source_field_list = [f.name for f in arcpy.ListFields(self.params[0].value)]
            self.params[2].filters[0].list = source_field_list
            
        if self.params[1].altered and self.params[1].value:
            target_field_list = [f.name for f in arcpy.ListFields(self.params[1].value)]
            self.params[2].filters[1].list = target_field_list
        return&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 12:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1331925#M73385</guid>
      <dc:creator>MattHowe</dc:creator>
      <dc:date>2023-09-25T12:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Populate two columns of a value table parameter with field names derived from two other parameters</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1350439#M75261</link>
      <description>&lt;P&gt;Thanks for posting this. ESRI should consider adding this to their help documentation. Without having preset filters created you can't set them via arcpy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    def initializeParameters(self):
  
        self.params[0].filters[0].list = ['test']

# error returned: AttributeError: ParameterObject: Get attribute: filters does not exist&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help doc states the following, which isn't true from arcpy. If you add a list to a ValueTable that doesn't have a filter predefined you get errors.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;By adding values to an empty filter, you activate the filter, and the user's choices are limited by the contents of the filter. (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/programming-a-toolvalidator-class.htm#GUID-40D99D78-5DFB-4D66-A304-B5858E836E70" target="_self"&gt;link&lt;/A&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 19:59:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/populate-two-columns-of-a-value-table-parameter/m-p/1350439#M75261</guid>
      <dc:creator>PhilLarkin1</dc:creator>
      <dc:date>2023-11-16T19:59:58Z</dc:date>
    </item>
  </channel>
</rss>

