<?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: Getting join info with Arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/getting-join-info-with-arcpy/m-p/186184#M14320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you can easily get the target and join layers like this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
inputLayer = r"...\testLayer.lyr"

targetLayerName = (arcpy.mapping.Layer(inputLayer)).name
fields = arcpy.ListFields(inputLayer)

lyrList = []
for item in fields:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((item.name).split('.'))[0] not in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrList.append(((item.name).split('.'))[0])

for lyr in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr != targetLayerName:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Join Layer: '+lyr
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for finding the join ID and type, no clue as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:26:00 GMT</pubDate>
    <dc:creator>ChrisPedrezuela</dc:creator>
    <dc:date>2021-12-11T09:26:00Z</dc:date>
    <item>
      <title>Getting join info with Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/getting-join-info-with-arcpy/m-p/186183#M14319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone been able to get join info from a layer using Arcpy without using ArcObjects?&amp;nbsp; I am trying to find the target table and field, the join table and field, and the join type.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 20:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getting-join-info-with-arcpy/m-p/186183#M14319</guid>
      <dc:creator>MichaelHeavenor</dc:creator>
      <dc:date>2014-07-02T20:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting join info with Arcpy</title>
      <link>https://community.esri.com/t5/python-questions/getting-join-info-with-arcpy/m-p/186184#M14320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you can easily get the target and join layers like this,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
inputLayer = r"...\testLayer.lyr"

targetLayerName = (arcpy.mapping.Layer(inputLayer)).name
fields = arcpy.ListFields(inputLayer)

lyrList = []
for item in fields:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((item.name).split('.'))[0] not in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyrList.append(((item.name).split('.'))[0])

for lyr in lyrList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr != targetLayerName:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Join Layer: '+lyr
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for finding the join ID and type, no clue as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:26:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getting-join-info-with-arcpy/m-p/186184#M14320</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2021-12-11T09:26:00Z</dc:date>
    </item>
  </channel>
</rss>

