<?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: Python Toolbox: parameter data type to access a field(s) in a table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699366#M102993</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm using a Python Toolbox because the end product not mentioned here requires it. Value table got me a step closer it appears. Now I'm able to get param1 Address Field to populate with fields from the input CSV. I also gave it an out file param. But, all the params still don't seem to be functioning as a whole.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt; def getParameterInfo(self):
        """Define the tool parameters."""
        # 1st param
        param0 = arcpy.Parameter(
            displayName="Your CSV",
            name="your_csv",
            datatype="DEFile",
            parameterType='Required',
            direction='Input'
        )
        param1 = arcpy.Parameter(
            displayName='Address Field',
            name='ADDRESS',
            datatype='GPValueTable',
            parameterType='Required',
            direction='Input'
        )
        param1.parameterDependencies = [param0.name]
        param1.columns = [['Field', 'Field']]

        # 2nd param
        param2 = arcpy.Parameter(
            displayName="Geocoder",
            name='geocoder',
            datatype="DEAddressLocator",
            parameterType='Required',
            direction='Input'
        )
        # 3rd param
        param3 = arcpy.Parameter(
            displayName="Out File",
            name='out_file',
            datatype="DEFile",
            parameterType='Required',
            direction='Output',
        )
        params = [param0,param1,param2,param3]

        return params

def execute(self, parameters, messages):
        """The source code of the tool."""
        import arcpy

        arcpy.geocoding.GeocodeFile(
            in_table=parameters[0].valueAsText,
            locator=parameters[2].valueAsText,
            address_fields=parameters[1].valueAsText,
            output_type=parameters[0].valueAsText,
            # output_location=r"C:\Users\me\test",
            # output_name="geocodedfile",
            # country=None,
            # location_type="ROUTING_LOCATION",
            # category=None,
            # output_fields="ALL"
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1777565744612.png" style="width: 796px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151800iBEF1E27098983723/image-dimensions/796x450?v=v2" width="796" height="450" role="button" title="JaredPilbeam2_0-1777565744612.png" alt="JaredPilbeam2_0-1777565744612.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2026 16:15:59 GMT</pubDate>
    <dc:creator>JaredPilbeam2</dc:creator>
    <dc:date>2026-04-30T16:15:59Z</dc:date>
    <item>
      <title>Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699182#M102984</link>
      <description>&lt;P data-unlink="true"&gt;I'm attempting to create a python toolbox script that geocodes a CSV. It will be my version of the Geocode Addresses tool. What do I need to do to get the Field parameter to accept the 'ADDRESS' field of my CSV? Right now, the 3rd param accepts a Field datatype. I didn't see a good option in parameter controls either. If i run this tool as is I receive errors. Two of the errors mention needing an output parameter, which I'll get to. I'm assuming &lt;A href="https://pro.arcgis.com/en/pro-app/3.5/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-00776-00800-000800.htm" target="_self"&gt;Error 000800&lt;/A&gt;&amp;nbsp;is referring to the Field parameter, but beyond that I don't really know. Maybe it's in the script itself.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="geo.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151777i1F0715DF3A1CA6B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="geo.png" alt="geo.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;class GeocodeFile:
    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = "Geocode File"
        self.description = "Geocodes a local file and saves it back to the same directory."
        self.params = arcpy.GetParameterInfo()
        

    def getParameterInfo(self):
        """Define the tool parameters."""
        # 1st param
        param0 = arcpy.Parameter(
            displayName="Your CSV",
            name="your_csv",
            datatype="DEFile",
            parameterType='Required',
            direction='Input'
        )
        # 2nd param
        param1 = arcpy.Parameter(
            displayName="Geocoder",
            name='geocoder',
            datatype="DEAddressLocator",
            parameterType='Required',
            direction='Input'
        )
        # 3rd param
        param2 = arcpy.Parameter(
            displayName="Field",
            name='fields',
            datatype="Field",
            parameterType='Required',
            direction='Input',
        )
        # param2.controlCLSID = '{172840BF-D385-4F83-80E8-2AC3B79EB0E0}'
        # param2.value="ADDRESS"

        params = [param0,param1,param2]

        return params

    def isLicensed(self):
        """Set whether the tool is licensed to execute."""
        return True

    def updateParameters(self, parameters):
        """Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""
        return

    def updateMessages(self, parameters):
        """Modify the messages created by internal validation for each tool
        parameter. This method is called after internal validation."""
        return

    def execute(self, parameters, messages):
        """The source code of the tool."""
        import arcpy

        arcpy.geocoding.GeocodeFile(
            in_table=parameters[0].valueAsText,
            locator=parameters[1].valueAsText,
            address_fields=parameters[2].valueAsText,
            output_type=parameters[0].valueAsText,
            # output_location=r"C:\Users\test",
            # output_name="geocodedfile",
            # country=None,
            # location_type="ROUTING_LOCATION",
            # category=None,
            # output_fields="ALL"
        )

        return

    def postExecute(self, parameters):
        """This method takes place after outputs are processed and
        added to the display."""
        return&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="g1178.png" style="width: 687px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151784i360776BF774DDF8C/image-dimensions/687x573?v=v2" width="687" height="573" role="button" title="g1178.png" alt="g1178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 14:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699182#M102984</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-04-30T14:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699185#M102985</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699182#M102984" target="_blank"&gt;Python Toolbox: parameter data type to access a fi... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The field names have a dependency&amp;nbsp; on the input file and on a quick read the setup might be the same as in the code examples.&amp;nbsp; Under&amp;nbsp;Value table parameters there is an example which sets this for the parameter list (eg&amp;nbsp;param1.parameterDependencies = [param0.name] )&lt;/P&gt;&lt;P&gt;Custom toolboxes make this visually easier to setup if you want to experiment with that first&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2026 20:54:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699185#M102985</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2026-04-29T20:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699366#M102993</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm using a Python Toolbox because the end product not mentioned here requires it. Value table got me a step closer it appears. Now I'm able to get param1 Address Field to populate with fields from the input CSV. I also gave it an out file param. But, all the params still don't seem to be functioning as a whole.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt; def getParameterInfo(self):
        """Define the tool parameters."""
        # 1st param
        param0 = arcpy.Parameter(
            displayName="Your CSV",
            name="your_csv",
            datatype="DEFile",
            parameterType='Required',
            direction='Input'
        )
        param1 = arcpy.Parameter(
            displayName='Address Field',
            name='ADDRESS',
            datatype='GPValueTable',
            parameterType='Required',
            direction='Input'
        )
        param1.parameterDependencies = [param0.name]
        param1.columns = [['Field', 'Field']]

        # 2nd param
        param2 = arcpy.Parameter(
            displayName="Geocoder",
            name='geocoder',
            datatype="DEAddressLocator",
            parameterType='Required',
            direction='Input'
        )
        # 3rd param
        param3 = arcpy.Parameter(
            displayName="Out File",
            name='out_file',
            datatype="DEFile",
            parameterType='Required',
            direction='Output',
        )
        params = [param0,param1,param2,param3]

        return params

def execute(self, parameters, messages):
        """The source code of the tool."""
        import arcpy

        arcpy.geocoding.GeocodeFile(
            in_table=parameters[0].valueAsText,
            locator=parameters[2].valueAsText,
            address_fields=parameters[1].valueAsText,
            output_type=parameters[0].valueAsText,
            # output_location=r"C:\Users\me\test",
            # output_name="geocodedfile",
            # country=None,
            # location_type="ROUTING_LOCATION",
            # category=None,
            # output_fields="ALL"
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1777565744612.png" style="width: 796px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151800iBEF1E27098983723/image-dimensions/796x450?v=v2" width="796" height="450" role="button" title="JaredPilbeam2_0-1777565744612.png" alt="JaredPilbeam2_0-1777565744612.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 16:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699366#M102993</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-04-30T16:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699431#M102996</link>
      <description>&lt;P&gt;So, looking at those error messages, it looks like you have the following problems:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is your input CSV actually a CSV? GeocodeFile() doesn't think it is, and I can't see the file extension on your screenshots. You might want to add a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameters-in-a-python-toolbox.htm#:~:text=Fire_Station.lyrx%27)-,Apply%20filters%20to%20a%20parameter,-Applying%20a%20filter" target="_self"&gt;filter&lt;/A&gt; to that parameter to ensure you get the right file type in there.&lt;/LI&gt;&lt;LI&gt;The issue for output location and output name is that you're not providing a destination for the output file to GeocodeFile(). For example, in both code blocks you've attached, those parameters are commented out. They look like they're required.&lt;OL&gt;&lt;LI&gt;Using the output parameter the way you're doing now is a good idea, but you're going to have to split the location and the name before feeding them to GeocodeFile()&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;You're also going to have problems using the first parameter for the output format, since that parameter takes &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/geocoding/geocode-file.htm" target="_self"&gt;specific values&lt;/A&gt;. I plugged in "CSV" below.&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="python"&gt;def execute(self, parameters, messages):
        """The source code of the tool."""
        import arcpy
        import os
        outfile = parameters[3].valueAsText
        outloc = os.path.dirname(outfile)
        outname = os.path.basename(outfile)
        arcpy.geocoding.GeocodeFile(
            in_table=parameters[0].valueAsText,
            locator=parameters[2].valueAsText,
            address_fields=parameters[1].valueAsText,
            output_type= "CSV",
            output_location= outloc,
            output_name= outname,
            # country=None,
            # location_type="ROUTING_LOCATION",
            # category=None,
            # output_fields="ALL"
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 18:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699431#M102996</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2026-04-30T18:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699873#M103025</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/458875"&gt;@AlfredBaldenweck&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1.) Yes, I have only been testing CSVs. Added a filter anyway.&lt;/P&gt;&lt;P&gt;2.) I should've had this filled out completely to begin with. It's a lot clearer now.&lt;/P&gt;&lt;P&gt;3) Added a filter here too. Seems to be fine now.&lt;/P&gt;&lt;P&gt;All in all those were good fixes. It's narrowed down to two errors tied to the GeocodeFile() function which have pretty unhelpful pages. &lt;A href="https://pro.arcgis.com/en/pro-app/3.4/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-03326-03350-003346.htm" target="_self"&gt;Error 003346&lt;/A&gt; and &lt;A href="https://pro.arcgis.com/en/pro-app/3.4/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-02601-02625-002617.htm" target="_self"&gt;Error 002617&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcgisscripting.ExecuteError: ERROR 003346: Geocode File failed.
ERROR 002617: Batch Geocoding stopped with status esriJobFailed.
Failed to execute (GeocodeFile).&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Things I've looked into regarding the geocoding errors:&lt;/P&gt;&lt;P&gt;1. Our locators are hosted on Enterprise Portal v. 11.3 which allows batch geocoding up to 1000 rows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_0-1777908312271.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151929i27FBE44809950E25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JaredPilbeam2_0-1777908312271.png" alt="JaredPilbeam2_0-1777908312271.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I've tested with different CSVs, different addresses and different field value formats.&lt;/P&gt;&lt;P&gt;3. The locator coordinate system is set for NAD_83.&lt;/P&gt;&lt;P&gt;4. I've been trying different locators and the tool has not ran with any of them while every time it has produced at least one of the two errors above. &lt;A href="https://pro.arcgis.com/en/pro-app/3.4/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-02601-02625-002618.htm" target="_self"&gt;Error 002618&lt;/A&gt; was also produced once too.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 15:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699873#M103025</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-05-04T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699878#M103026</link>
      <description>&lt;P&gt;I think it may be a problem with your field parameter. The &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/geocoding/geocode-file.htm" target="_self"&gt;geocode&lt;/A&gt; tool takes a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameter-data-types-in-a-python-toolbox.htm#:~:text=a%20single%20attribute.-,Field,-Info" target="_self"&gt;FieldInfo&lt;/A&gt; Parameter (idk how those work) and you're feeding it either a Field (original post) or a value table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1777909010234.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/151930i8BA48F5035DC5B9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1777909010234.png" alt="AlfredBaldenweck_0-1777909010234.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Are you able to get the tool to run normally, outside of the toolbox?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 15:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699878#M103026</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2026-05-04T15:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python Toolbox: parameter data type to access a field(s) in a table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699926#M103031</link>
      <description>&lt;P&gt;Your suspicion was correct. I simply removed the field parameter and hardcoded what the Geocode File tool accepts and the tool ran without any error.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def execute(self, parameters, messages):
        """The source code of the tool."""
        import arcpy
        import os
        outfile = parameters[2].valueAsText
        outloc = os.path.dirname(outfile)
        outname = os.path.basename(outfile)
arcpy.geocoding.GeocodeFile(
            in_table=parameters[0].valueAsText,
            locator=parameters[1].valueAsText,
            #Geocode File tool Address Field Mapping parameter
            address_fields="'Single Line Input' ADDRESS VISIBLE NONE", 
            output_type="CSV",
            output_location=outloc,
            output_name=outname,
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 May 2026 18:44:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-toolbox-parameter-data-type-to-access-a/m-p/1699926#M103031</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2026-05-04T18:44:41Z</dc:date>
    </item>
  </channel>
</rss>

