<?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: Batch Deleting Survey Data from Survey 123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399689#M55679</link>
    <description>&lt;P&gt;I haven't done this, myself, but I would think you'd be able to use the Where clause on that page and enter a SQL query for the date range you wanted to delete.&lt;/P&gt;&lt;P&gt;Say you wanted to keep the surveys from today and delete anything older than that, and that your date field was just called "Date":&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;Date &amp;lt; '2024-03-22'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2024 15:27:16 GMT</pubDate>
    <dc:creator>MErikReedAugusta</dc:creator>
    <dc:date>2024-03-22T15:27:16Z</dc:date>
    <item>
      <title>Batch Deleting Survey Data from Survey 123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399684#M55677</link>
      <description>&lt;P data-unlink="true"&gt;I am trying to seek some assistance in cleaning up our Survey 123 data from one survey form. We currently have over 3000 records that include field data, geolocations and photos. In an attempt to clean things up and free of up some space, I would like to delete most of the records (they have all been backed up onto a company server.) I realize that batch deleting on the Survey 123 website is not possible and you can only delete one record at a time. This is going to be very time consuming with 3000 records, so I am trying to figure out a way to batch delete the records based on date the record was created. I have read over the articles&amp;nbsp;&lt;A href="https://support.esri.com/en-us/knowledge-base/is-it-possible-to-batch-delete-features-in-arcgis-onlin-000013805" target="_blank"&gt;FAQ: Is It Possible to Batch Delete Features in ArcGIS Online? (esri.com)&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://support.esri.com/en-us/knowledge-base/how-to-batch-delete-features-from-an-arcgis-online-host-000024111" target="_self"&gt;How To: Batch Delete Features from an ArcGIS Online Hosted Feature Layer (esri.com)&lt;/A&gt; however I am still having difficulties understanding how to find the correct Object IDs to delete all of the records.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Any help in this matter would be greatly appreciated.&lt;/P&gt;&lt;P data-unlink="true"&gt;Thanks,&lt;/P&gt;&lt;P data-unlink="true"&gt;Tyler&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 15:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399684#M55677</guid>
      <dc:creator>TylerGingras</dc:creator>
      <dc:date>2024-03-22T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Deleting Survey Data from Survey 123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399687#M55678</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/778602"&gt;@TylerGingras&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have ArcGIS Pro? If so you could open the feature service through the Portal in ArcGIS Pro and delete the records from there using the attribute table to help.&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 15:24:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399687#M55678</guid>
      <dc:creator>BenBlowers2</dc:creator>
      <dc:date>2024-03-22T15:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Deleting Survey Data from Survey 123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399689#M55679</link>
      <description>&lt;P&gt;I haven't done this, myself, but I would think you'd be able to use the Where clause on that page and enter a SQL query for the date range you wanted to delete.&lt;/P&gt;&lt;P&gt;Say you wanted to keep the surveys from today and delete anything older than that, and that your date field was just called "Date":&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;Date &amp;lt; '2024-03-22'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 15:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399689#M55679</guid>
      <dc:creator>MErikReedAugusta</dc:creator>
      <dc:date>2024-03-22T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Deleting Survey Data from Survey 123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399871#M55689</link>
      <description>&lt;P&gt;Hi, I used this script in a notebook. It saves the data to a geodatabase including all attachments and saves it in AGOL. Then it deletes the data in the survey.&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcgis.gis&lt;/P&gt;&lt;P&gt;gis = arcgis.GIS("home") #replace these with your credentials&lt;BR /&gt;item_id='xxxxxxxxxxxxxxxxxxxxx' #repace with the service_ID of the hosted feature layer to download&lt;BR /&gt;GDBname = "Temp_FGB1" # name of the temporary GDB to be saved in ArcGIS Online&lt;/P&gt;&lt;P&gt;AGOLitem = gis.content.get(item_id)&lt;BR /&gt;print ("Exporting Hosted Feature Layer...")&lt;BR /&gt;AGOLitem.export(GDBname,'File Geodatabase', parameters=None, wait='True')&lt;BR /&gt;time.sleep(10)#add 10 seconds delay to allow export to complete&lt;/P&gt;&lt;P&gt;arcpy.management.DeleteRows(&lt;BR /&gt;in_rows=r'&lt;A href="https://services1.arcgis.com/yourdata/FeatureServer/0" target="_blank"&gt;https://services1.arcgis.com/yourdata/FeatureServer/0&lt;/A&gt;'&lt;BR /&gt;) #replace with your survey feature&amp;nbsp;service&lt;BR /&gt;print ("Deleted Rows")&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 22:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/batch-deleting-survey-data-from-survey-123/m-p/1399871#M55689</guid>
      <dc:creator>JessicaRamirez1</dc:creator>
      <dc:date>2024-03-22T22:10:38Z</dc:date>
    </item>
  </channel>
</rss>

