<?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: ListBrokenDataSources and TableViews in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690207#M53514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's what I came up with to identify if I'm dealing with a TableView:&lt;/P&gt;&lt;P&gt;brknItemType = str(type(brknItem))&lt;BR /&gt; splitType = brknItemType.split('.')[-1]&lt;BR /&gt; itemType = splitType[:-2]&lt;BR /&gt; ProcessMessage('itemType = {}'.format(itemType),systemUsed,'N')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/490505_output.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's probably a prettier way to do it, but this should work for my needs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2020 15:53:20 GMT</pubDate>
    <dc:creator>ChrisHolmes</dc:creator>
    <dc:date>2020-04-30T15:53:20Z</dc:date>
    <item>
      <title>ListBrokenDataSources and TableViews</title>
      <link>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690206#M53513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;ListBrokenDataSources returns a python list. What's the best way to determine if the item you are dealing with in the list is a TableView?&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;.supports('workspacePath') and .supports('dataSource') to deal with shapefiles and geodatabase feature classes.&lt;/P&gt;&lt;P&gt;I'm getting this error message when a TableView is found in the list:&lt;/P&gt;&lt;P&gt;AttributeError: 'TableView' object has no attribute 'supports'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How&amp;nbsp;should I go about getting at the TableView properties to determine that it's a TableView?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2020 13:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690206#M53513</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-04-30T13:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: ListBrokenDataSources and TableViews</title>
      <link>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690207#M53514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's what I came up with to identify if I'm dealing with a TableView:&lt;/P&gt;&lt;P&gt;brknItemType = str(type(brknItem))&lt;BR /&gt; splitType = brknItemType.split('.')[-1]&lt;BR /&gt; itemType = splitType[:-2]&lt;BR /&gt; ProcessMessage('itemType = {}'.format(itemType),systemUsed,'N')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/490505_output.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's probably a prettier way to do it, but this should work for my needs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2020 15:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690207#M53514</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-04-30T15:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: ListBrokenDataSources and TableViews</title>
      <link>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690208#M53515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have the solution.&amp;nbsp; For a "prettier way", perhaps:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;if 'TableView' in str(type(brknItem)):
    # do something‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:03:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690208#M53515</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T05:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: ListBrokenDataSources and TableViews</title>
      <link>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690209#M53516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "is" method is more canonical for checking object identity:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;brknItem&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableView&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One can also use isinstance():&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;isinstance&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;brknItem&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2020 22:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listbrokendatasources-and-tableviews/m-p/690209#M53516</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-05-02T22:39:57Z</dc:date>
    </item>
  </channel>
</rss>

