<?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: Performing a Join Field Between 2 Feature Class Lists Using ArcPy in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1259217#M50423</link>
    <description>&lt;P&gt;Hi Dan,&amp;nbsp;&lt;BR /&gt;This worked perfectly. Thanks.&lt;BR /&gt;&lt;BR /&gt;Just for reference here is the complete code for the code starting in line 13&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for i in joins:
    arcpy.management.JoinField(i[0], "OBJECTID", i[1], "OBJECTID",None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')&lt;/LI-CODE&gt;&lt;P&gt;Regards, Kedar&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 04:39:57 GMT</pubDate>
    <dc:creator>KedaravindanBhaskar</dc:creator>
    <dc:date>2023-02-17T04:39:57Z</dc:date>
    <item>
      <title>Performing a Join Field Between 2 Feature Class Lists Using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1258914#M50401</link>
      <description>&lt;P&gt;Hi all, hope you are well,&lt;/P&gt;&lt;P&gt;&lt;U&gt;I am trying to perform a join field between two lists of feature classes using a for loop&lt;/U&gt;. Currently I am joining each item in the list with the corresponding item in another list individually. Here is a snippet of code -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Creating list of points. Splitting into groups of 1 &amp;amp; 2
SamplePoints1 = ["PT1_points_DirWestLines", "PT1_points_DirSouthLines", "PT1_points_DirEastLines", "PT1_points_DirNorthLines"]
SamplePoints2 = ["PT2_points_DirWestLines", "PT2_points_DirSouthLines", "PT2_points_DirEastLines", "PT2_points_DirNorthLines"]
AllPoints = ["SamplePoints1","SamplePoints2"]

#Altering to preserve info on which group the point came from
for points2 in SamplePoints2:
    arcpy.management.AlterField(points2, "Elevation", "Elevation_2", "Elevation_2", "FLOAT", 4, "NULLABLE", "DO_NOT_CLEAR")

#Joining back both point lists
###Here is where I am facing challenges
arcpy.management.JoinField("PT1_points_DirNorthLines", "OBJECTID", "PT2_points_DirNorthLines", "OBJECTID", None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')
arcpy.management.JoinField("PT1_points_DirEastLines", "OBJECTID", "PT2_points_DirEastLines", "OBJECTID", None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')
arcpy.management.JoinField("PT1_points_DirSouthLines", "OBJECTID", "PT2_points_DirSouthLines", "OBJECTID", None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')
arcpy.management.JoinField("PT1_points_DirWestLines", "OBJECTID", "PT2_points_DirWestLines", "OBJECTID", None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here's the Syntax for the join field tool -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.management.JoinField(in_data, in_field, join_table, join_field, {fields}, {fm_option}, {field_mapping})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a method to achieve the join field as lists or do I have to do each individually? Any help is appreciated. Please let me know if there is anything else you need to assist&amp;nbsp;me.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards, Kedar&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 15:50:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1258914#M50401</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2023-02-16T15:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a Join Field Between 2 Feature Class Lists Using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1258925#M50403</link>
      <description>&lt;P&gt;if the lists are paired as they appear to be, you can zip and save a line or two... assuming everything works as you have posted.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;SamplePoints1 = ["PT1_points_DirWestLines", "PT1_points_DirSouthLines",
                 "PT1_points_DirEastLines", "PT1_points_DirNorthLines"]
SamplePoints2 = ["PT2_points_DirWestLines", "PT2_points_DirSouthLines",
                 "PT2_points_DirEastLines", "PT2_points_DirNorthLines"]

joins = list(zip(SamplePoints1, SamplePoints2))
joins
[('PT1_points_DirWestLines', 'PT2_points_DirWestLines'),
 ('PT1_points_DirSouthLines', 'PT2_points_DirSouthLines'),
 ('PT1_points_DirEastLines', 'PT2_points_DirEastLines'),
 ('PT1_points_DirNorthLines', 'PT2_points_DirNorthLines')]

for i in joins:
    arcpy.management.JoinField(i[0], "OBJECTID", i[1], ....etc)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1258925#M50403</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-02-16T16:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a Join Field Between 2 Feature Class Lists Using ArcPy</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1259217#M50423</link>
      <description>&lt;P&gt;Hi Dan,&amp;nbsp;&lt;BR /&gt;This worked perfectly. Thanks.&lt;BR /&gt;&lt;BR /&gt;Just for reference here is the complete code for the code starting in line 13&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for i in joins:
    arcpy.management.JoinField(i[0], "OBJECTID", i[1], "OBJECTID",None, "USE_FM", 'Elevation_2 "Elevation_2" true true false 4 Float 0 0,First,#,PT2_points_DirEastLines,Elevation_2,-1,-1')&lt;/LI-CODE&gt;&lt;P&gt;Regards, Kedar&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 04:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/performing-a-join-field-between-2-feature-class/m-p/1259217#M50423</guid>
      <dc:creator>KedaravindanBhaskar</dc:creator>
      <dc:date>2023-02-17T04:39:57Z</dc:date>
    </item>
  </channel>
</rss>

