<?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 Testing whether at table is joined in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215902#M16632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know how to see whether a feature layer or table view already contain a join, and if so how to get the name of the join table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem arises from the fact that :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - arcpy.AddField_management(...) returns an error if the feature class or table is joined and &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - arcpy.RemoveJoin_mangement() also returns an error if there no join !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There seems only to be tools like arcpy.AddJoin_management and arcpy.RemoveJoin_management&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I miss:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) arcpy.RemoveAllJoins_management&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) a TableView property hasJoin&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jan 2011 08:32:34 GMT</pubDate>
    <dc:creator>MichaelStjernholm</dc:creator>
    <dc:date>2011-01-19T08:32:34Z</dc:date>
    <item>
      <title>Testing whether at table is joined</title>
      <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215902#M16632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know how to see whether a feature layer or table view already contain a join, and if so how to get the name of the join table?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem arises from the fact that :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - arcpy.AddField_management(...) returns an error if the feature class or table is joined and &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; - arcpy.RemoveJoin_mangement() also returns an error if there no join !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There seems only to be tools like arcpy.AddJoin_management and arcpy.RemoveJoin_management&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I miss:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) arcpy.RemoveAllJoins_management&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;b) a TableView property hasJoin&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 08:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215902#M16632</guid>
      <dc:creator>MichaelStjernholm</dc:creator>
      <dc:date>2011-01-19T08:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Testing whether at table is joined</title>
      <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215903#M16633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to see some functionality related to testing/examining joins as well! I'm not a v10 pro though, so maybe there is more functionality exposed there than in v9.3...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's probably a safe assumption that if a feature layer or table view has a "." in the field name, there is an active join. The table name of the table that is joined will of course have the same name as the part preceding the "." (mytable.fieldname). Not sure about the path though... Just curious but all the tools now have a "result object". Could perhaps one of the result objects from the RemoveJoin tool return the path of the join table??? Maybe one of the describe properties in v10?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 15:04:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215903#M16633</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-01-19T15:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Testing whether at table is joined</title>
      <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215904#M16634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That brings up an interesting point. How do you get the result object from a GP tool that is throwing an error? The result variable in result = gp.RemoveJoin_management("layerName", "fakeJoinName") never gets assigned because Python has to do something with the error it throws.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to this &lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2008/12/01/Tips-and-tricks-_2D00_-Error-handling-in-Python-script-tools.aspx"&gt;geoprocessing blog post&lt;/A&gt;&lt;SPAN&gt;, you basically can't, unless running it as a GP service on ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an aside, the table name used in the join will be in the error message if you use a nonexistent join name, so you could parse the error message for the table name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I don't see anything new in 10 that helps with this. Maybe take a look at running ArcObjects under Python:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python"&gt;http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/5017/python-comtypes-and-arcobjects-error-creating-approt-object/5082#5082"&gt;http://gis.stackexchange.com/questions/5017/python-comtypes-and-arcobjects-error-creating-approt-object/5082#5082&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 17:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215904#M16634</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-01-19T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Testing whether at table is joined</title>
      <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215905#M16635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Logan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have a problem of getting my error message as I use ArcGIS10 and immideately get the error thrown in my processing window ! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was considering to solve the issue by grabbing the list of fields and check whether any of the fieldname.split(".) would result in 2 parts of which the first would be the Join table! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 11:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215905#M16635</guid>
      <dc:creator>MichaelStjernholm</dc:creator>
      <dc:date>2011-01-20T11:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Testing whether at table is joined</title>
      <link>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215906#M16636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe try this GP tool: &lt;A href="http://www.arcgis.com/home/item.html?id=3f5c49c5f6ee44ffbbb643e47c41096c"&gt;Get joined table properties using geoprocessing tool&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Have fun,&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 10:55:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/testing-whether-at-table-is-joined/m-p/215906#M16636</guid>
      <dc:creator>FrédéricPRALLY</dc:creator>
      <dc:date>2015-12-17T10:55:23Z</dc:date>
    </item>
  </channel>
</rss>

