<?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: Delete Features and Attachements in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362657#M69449</link>
    <description>&lt;P&gt;To be honest, I'm not really sure what you're trying to accomplish here.&lt;/P&gt;&lt;P&gt;If you empty both tables, append in the features to the feature class.&lt;/P&gt;&lt;P&gt;From there, you have the following options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Manually add attachments to each feature using the Attribute Pane&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1703006496701.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89524i52B3AD7B23ACFB35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1703006496701.png" alt="AlfredBaldenweck_0-1703006496701.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;If you're trying to copy/paste attachments from another attachment table, you can just do that with Append, but you'll have to manually change the RELGLOBALID in the attachment table to actually make them correctly attach to the appropriate record in the feature class.&lt;/LI&gt;&lt;LI&gt;OR, if your new attachments live in a folder, run "Generate Match Table" using the feature class and said folder, then run "AddAttachments".&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 19 Dec 2023 17:23:59 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2023-12-19T17:23:59Z</dc:date>
    <item>
      <title>Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362589#M69442</link>
      <description>&lt;P&gt;Which GeoProcessing Tool deletes all the Feature Class records and ALL the attachments?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:24:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362589#M69442</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362597#M69443</link>
      <description>&lt;P&gt;Assuming it's in a geodatabase, rather than AGOL, you want to use &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/truncatetable.htm" target="_blank" rel="noopener"&gt;Truncate&lt;/A&gt; on both the feature class ("....gdb\exampleFc") and the attachment table ("....gdb\exampleFc__ATTACH")&amp;nbsp;&lt;EM&gt;Note: There are two underscores before ATTACH&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362597#M69443</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-19T16:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362600#M69444</link>
      <description>&lt;P&gt;OK so there is on tool that does both I have to address but the FC and Attach Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes this is an enterprise GDB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362600#M69444</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362602#M69445</link>
      <description>&lt;P&gt;Yes, run it twice.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362602#M69445</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-19T16:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362603#M69446</link>
      <description>&lt;P&gt;If I use Append ... does that add Features and Attachments back ?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362603#M69446</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T16:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362612#M69447</link>
      <description>&lt;P&gt;It depends.&lt;/P&gt;&lt;P&gt;Append would definitely work to add the features back in to your feature class.&lt;/P&gt;&lt;P&gt;Attachments are a little more complicated. Appending from another Attachment table would get the records in, but you'd manually have to change the relGlobalID to make them match.&lt;/P&gt;&lt;P&gt;Using the Add Attachments (and generate match table) tool is slower, but it works on attachments sitting in a folder.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 16:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362612#M69447</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-19T16:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362651#M69448</link>
      <description>&lt;P&gt;Not really following the attachments part...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the FC and Attachments in the target are EMPTY&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do I need to run a process to create the match table&lt;/LI&gt;&lt;LI&gt;Then append attachments using this table?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Not sure how that workflow works....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:14:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362651#M69448</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T17:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362657#M69449</link>
      <description>&lt;P&gt;To be honest, I'm not really sure what you're trying to accomplish here.&lt;/P&gt;&lt;P&gt;If you empty both tables, append in the features to the feature class.&lt;/P&gt;&lt;P&gt;From there, you have the following options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Manually add attachments to each feature using the Attribute Pane&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1703006496701.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89524i52B3AD7B23ACFB35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1703006496701.png" alt="AlfredBaldenweck_0-1703006496701.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;If you're trying to copy/paste attachments from another attachment table, you can just do that with Append, but you'll have to manually change the RELGLOBALID in the attachment table to actually make them correctly attach to the appropriate record in the feature class.&lt;/LI&gt;&lt;LI&gt;OR, if your new attachments live in a folder, run "Generate Match Table" using the feature class and said folder, then run "AddAttachments".&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:23:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362657#M69449</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-19T17:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362665#M69450</link>
      <description>&lt;UL&gt;&lt;LI&gt;I have 2 FC and 8 tables in AGOL... with relationships&lt;/LI&gt;&lt;LI&gt;I have 2 FC and 8 Tables in Enterprise DB SDE ...&amp;nbsp;with relationships&lt;/LI&gt;&lt;LI&gt;I need to get the data from AGOL into SDE including the Attachments while retaining GLOBALIDs&amp;nbsp;with relationships&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:37:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362665#M69450</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T17:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362669#M69451</link>
      <description>&lt;P&gt;I have hundreds of attachments if not thousands...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont understand this workflow&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you're trying to copy/paste attachments from another attachment table, you can just do that with Append, but you'll have to manually change the RELGLOBALID in the attachment table to actually make them correctly attach to the appropriate record in the feature class.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:39:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362669#M69451</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362678#M69452</link>
      <description>&lt;P&gt;Why not just delete or overwrite the feature class/attachment table in the enterprise gdb? If you're willing to truncate it, I don't imagine it matters if you keep the original or not.&lt;/P&gt;&lt;P&gt;Exporting the data from AGOL is really easy, and as far as I recall, it should bring over all the attachments for you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfredBaldenweck_0-1703008207026.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89527i8395747AC2432CF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfredBaldenweck_0-1703008207026.png" alt="AlfredBaldenweck_0-1703008207026.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362678#M69452</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-19T17:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362687#M69453</link>
      <description>&lt;P&gt;Is the image from AGOL?&amp;nbsp; I thought you could not preserve the GLOBALID when you export out of AGOL&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:57:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1362687#M69453</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-19T17:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364864#M69503</link>
      <description>&lt;P&gt;Yes, at least with python 3, if you set the maintain attachments and preserve global id's environment variable, then the attachments will be appended with the features (as long as they are enabled on the fc also) and will retain the existing Global ID's.&lt;/P&gt;&lt;P&gt;I use this all the time.&amp;nbsp; I published my SDE data to AGOL as hosted feature layer, have lots of editing on the AGOL version, run a script that looks at the Global ID's in my SDE data, and the AGOL data.&amp;nbsp; Anything that is in the HFS, but not the SDE gets appended to the SDE so that I have a backup copy of the data, attachments and all (and, of course, one that responds much faster than any AGOL data).&lt;/P&gt;&lt;P&gt;This, does NOT, however, work the other way.&amp;nbsp; Seems there is no 'simple' way to copy data from SDE to AGOL with the attachments.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 20:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364864#M69503</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-12-28T20:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364865#M69504</link>
      <description>&lt;P&gt;I guess the bigger question for this workflow is: Why not share it as a service from the enterprise GDB in the first place, rather than hosting it?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 20:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364865#M69504</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-12-28T20:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Features and Attachements</title>
      <link>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364870#M69506</link>
      <description>&lt;P&gt;In my case, we don't have portal as of yet.&amp;nbsp; Our 10.6.1 and 10.8.1 server, will not allow you to edit feature service without opening up to the world (and don't want public to be able to truncate/alter our data).&amp;nbsp; we are using Window authentication, and ESRI tech support still can't figure out how to secure a feature service on our system.&lt;/P&gt;&lt;P&gt;Another big reason is for display/interaction with the data.&amp;nbsp; At this point, it I want to have my images (attachments) show in the popup in web app/ex, either need to have Portal or AGOL, as they have limited the popup config with MapServices to only allow list view.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Users are used to seeing the image(s) in the popup itself without having to scroll down, click a link, open image in separate window.&amp;nbsp; Among other things, but these two (mainly the first one) are work stoppers.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 21:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-features-and-attachements/m-p/1364870#M69506</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-12-28T21:01:34Z</dc:date>
    </item>
  </channel>
</rss>

