<?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: Automatically generate a csv file with the data obtained in a survey123 survey////Generar de manera automática un csv con los datos obtenidos en u in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/automatically-generate-a-csv-file-with-the-data/m-p/1131998#M39634</link>
    <description>&lt;P data-unlink="true"&gt;You could query the feature service that Survey123 reports to for the results from last month (using ArcGIS REST API) and replace your dictionary by those results. If it has to be a Notebook you probably need &lt;A href="https://enterprise.arcgis.com/en/notebook/" target="_self"&gt;Notebook Server&lt;/A&gt;. Otherwise, you could schedule the script on another device or server using Windows Task Scheduler.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jan 2022 13:35:26 GMT</pubDate>
    <dc:creator>AdminGIS2</dc:creator>
    <dc:date>2022-01-10T13:35:26Z</dc:date>
    <item>
      <title>Automatically generate a csv file with the data obtained in a survey123 survey////Generar de manera automática un csv con los datos obtenidos en una e</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/automatically-generate-a-csv-file-with-the-data/m-p/1131976#M39633</link>
      <description>&lt;P&gt;Good morning/afternoon/evening:&lt;BR /&gt;I have a survey in survey123 and would like to generate a csv, with the following fields:&lt;BR /&gt;- Date&lt;BR /&gt;- Month&lt;BR /&gt;- Project.&lt;BR /&gt;- Driver.&lt;BR /&gt;- Km done.&lt;BR /&gt;These fields are inside the survey&lt;BR /&gt;This csv must be generated automatically.&lt;BR /&gt;You have to make a notebook that generates it and that is executed monthly (on the 1st day of the following month).&lt;/P&gt;&lt;P&gt;With this script I manage to create a csv, with the data that I enter manually:&lt;BR /&gt;import csv&lt;BR /&gt;with open ('PVehiculo2.csv', 'w') as csvfile:&lt;BR /&gt;fieldnames=['Date', 'Month', 'Project', 'Driver', 'Km_realized']&lt;BR /&gt;writer = csv.DictWriter (csvfile, fieldnames=fieldnames)&lt;/P&gt;&lt;P&gt;writer.writeheader()&lt;BR /&gt;writer.writerow({'Date': '06/01/2022',&lt;BR /&gt;'Month':'March',&lt;BR /&gt;'Project': '151641163',&lt;BR /&gt;'Driver': 'jGarcia',&lt;BR /&gt;'Km_realized': '140'&lt;BR /&gt;})&lt;BR /&gt;writer.writerow({'Date': '10/01/2022',&lt;BR /&gt;'Month':'March',&lt;BR /&gt;'Project': 'Almo',&lt;BR /&gt;'Driver': 'jGarcia',&lt;BR /&gt;'Km_realized': '135.6'&lt;BR /&gt;})&lt;BR /&gt;writer.writerow({'Date': '11/01/2022',&lt;BR /&gt;'Month':'March',&lt;BR /&gt;'Project': '0206510',&lt;BR /&gt;'Driver': 'jGarcia',&lt;BR /&gt;'Km_realized': '150.6'&lt;BR /&gt;})&lt;BR /&gt;print ("data inserted")&lt;BR /&gt;&lt;BR /&gt;But I would like it to be done with the data that is in the survey and that the file is generated once a month.&lt;/P&gt;&lt;P&gt;thanks in advance to all of you who participate.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;##############################En español###########################################&lt;/P&gt;&lt;P&gt;Buenos dias/tardes/noches:&lt;BR /&gt;poseo una encuesta en survey123 y me gustaria generar un csv, con los siguientes campos:&lt;BR /&gt;• Fecha&lt;BR /&gt;• Mes&lt;BR /&gt;• Proyecto.&lt;BR /&gt;• Conductor.&lt;BR /&gt;• Km realizados.&lt;BR /&gt;Estos campos se encuentran dentro de la encuesta&lt;BR /&gt;Este csv se tiene que generar de manera automática.&lt;BR /&gt;Hay que hacer un notebook que lo genere y que se ejecute de manera mensual (los días 1 del mes siguiente).&lt;/P&gt;&lt;P&gt;con este script consigo crear un csv, con los datos que yo introduzco manualmente:&lt;BR /&gt;import csv&lt;BR /&gt;with open ('PVehiculo2.csv', 'w') as csvfile:&lt;BR /&gt;fieldnames=['Fecha', 'Mes', 'Proyecto', 'Conductor', 'Km_realizados']&lt;BR /&gt;writer = csv.DictWriter (csvfile, fieldnames=fieldnames)&lt;/P&gt;&lt;P&gt;writer.writeheader()&lt;BR /&gt;writer.writerow({'Fecha': '06/01/2022',&lt;BR /&gt;'Mes':'Marzo',&lt;BR /&gt;'Proyecto': '151641163',&lt;BR /&gt;'Conductor': 'jGarcia',&lt;BR /&gt;'Km_realizados': '140'&lt;BR /&gt;})&lt;BR /&gt;writer.writerow({'Fecha': '10/01/2022',&lt;BR /&gt;'Mes':'Marzo',&lt;BR /&gt;'Proyecto': 'Almo',&lt;BR /&gt;'Conductor': 'jGarcia',&lt;BR /&gt;'Km_realizados': '135.6'&lt;BR /&gt;})&lt;BR /&gt;writer.writerow({'Fecha': '11/01/2022',&lt;BR /&gt;'Mes':'Marzo',&lt;BR /&gt;'Proyecto': '0206510',&lt;BR /&gt;'Conductor': 'jGarcia',&lt;BR /&gt;'Km_realizados': '150.6'&lt;BR /&gt;})&lt;BR /&gt;print ("datos insertados")&lt;BR /&gt;&lt;BR /&gt;Pero me gustaría que se realizara con los datos que hay en la encuesta y que se genere el archivo una vez al mes&lt;/P&gt;&lt;P&gt;gracias de ante mano a todos lo que participéis.&lt;/P&gt;&lt;P&gt;Saludos&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 12:22:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/automatically-generate-a-csv-file-with-the-data/m-p/1131976#M39633</guid>
      <dc:creator>JavierCMartínezPrieto</dc:creator>
      <dc:date>2022-01-10T12:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically generate a csv file with the data obtained in a survey123 survey////Generar de manera automática un csv con los datos obtenidos en u</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/automatically-generate-a-csv-file-with-the-data/m-p/1131998#M39634</link>
      <description>&lt;P data-unlink="true"&gt;You could query the feature service that Survey123 reports to for the results from last month (using ArcGIS REST API) and replace your dictionary by those results. If it has to be a Notebook you probably need &lt;A href="https://enterprise.arcgis.com/en/notebook/" target="_self"&gt;Notebook Server&lt;/A&gt;. Otherwise, you could schedule the script on another device or server using Windows Task Scheduler.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 13:35:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/automatically-generate-a-csv-file-with-the-data/m-p/1131998#M39634</guid>
      <dc:creator>AdminGIS2</dc:creator>
      <dc:date>2022-01-10T13:35:26Z</dc:date>
    </item>
  </channel>
</rss>

