<?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 Survey123 Python Module Feature Report Names in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-python-module-feature-report-names/m-p/1007174#M31442</link>
    <description>&lt;P&gt;I am using Survey123 version 3.9 and the ArcGIS API for Python. I am successfully downloading reports, but I seem to have no control over the report file name. The test file name I am using is "Feature Report Title", but the file name of the report ouptut is "SurveyNameOIDXXXYYYYMMDDxxxxxx". When I don't specify the URL of my organization's ArcGISOnline account for GIS(), I see "Feature Report Title" in the survey's Report --&amp;gt; Recent tasks pane on Survey123 for a failed report download, but the report failed to download, and I get this message, "An error occurred when uploading result files to Portal for ArcGIS. 498. Invalid token.". Can I control the file name of the generate_report() outputs? I read this,&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-feature-how-to-change-the-word-doc-file-name/m-p/829348#M17993" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-feature-how-to-change-the-word-doc-file-name/m-p/829348#M17993&lt;/A&gt;, which indicates that in early 2019, controlling file names is not an option.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;username = 'myname_organization'&lt;/P&gt;&lt;P&gt;password = 'password'&lt;/P&gt;&lt;P&gt;template = 1&lt;/P&gt;&lt;P&gt;utc_offset = '-07:00'&lt;/P&gt;&lt;P&gt;gis = GIS("&lt;A href="https://organization.maps.arcgis.com" target="_blank" rel="noopener"&gt;https://organization.maps.arcgis.com&lt;/A&gt;", username=username, password=password)&lt;/P&gt;&lt;P&gt;sm = arcgis.apps.survey123.SurveyManager(gis)&lt;/P&gt;&lt;P&gt;survey_id = 'some unique identifier'&lt;/P&gt;&lt;P&gt;where_clause = 'objectid=someOID'&lt;/P&gt;&lt;P&gt;report_title = "Feature Report Title"&lt;/P&gt;&lt;P&gt;templates = survey.report_templates&lt;/P&gt;&lt;P&gt;survey.generate_report(templates[template], where_clause, utc_offset, report_title)&lt;/P&gt;&lt;P&gt;for x in survey.reports:&lt;/P&gt;&lt;P&gt;if survey_id in x.description:&lt;/P&gt;&lt;P&gt;data_item = gis.content.get(x.id)&lt;/P&gt;&lt;P&gt;data_item.download(save_path=r'DownloadFolderPath')&lt;/P&gt;</description>
    <pubDate>Sat, 05 Dec 2020 19:07:44 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-12-05T19:07:44Z</dc:date>
    <item>
      <title>Survey123 Python Module Feature Report Names</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-python-module-feature-report-names/m-p/1007174#M31442</link>
      <description>&lt;P&gt;I am using Survey123 version 3.9 and the ArcGIS API for Python. I am successfully downloading reports, but I seem to have no control over the report file name. The test file name I am using is "Feature Report Title", but the file name of the report ouptut is "SurveyNameOIDXXXYYYYMMDDxxxxxx". When I don't specify the URL of my organization's ArcGISOnline account for GIS(), I see "Feature Report Title" in the survey's Report --&amp;gt; Recent tasks pane on Survey123 for a failed report download, but the report failed to download, and I get this message, "An error occurred when uploading result files to Portal for ArcGIS. 498. Invalid token.". Can I control the file name of the generate_report() outputs? I read this,&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-feature-how-to-change-the-word-doc-file-name/m-p/829348#M17993" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-feature-how-to-change-the-word-doc-file-name/m-p/829348#M17993&lt;/A&gt;, which indicates that in early 2019, controlling file names is not an option.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;username = 'myname_organization'&lt;/P&gt;&lt;P&gt;password = 'password'&lt;/P&gt;&lt;P&gt;template = 1&lt;/P&gt;&lt;P&gt;utc_offset = '-07:00'&lt;/P&gt;&lt;P&gt;gis = GIS("&lt;A href="https://organization.maps.arcgis.com" target="_blank" rel="noopener"&gt;https://organization.maps.arcgis.com&lt;/A&gt;", username=username, password=password)&lt;/P&gt;&lt;P&gt;sm = arcgis.apps.survey123.SurveyManager(gis)&lt;/P&gt;&lt;P&gt;survey_id = 'some unique identifier'&lt;/P&gt;&lt;P&gt;where_clause = 'objectid=someOID'&lt;/P&gt;&lt;P&gt;report_title = "Feature Report Title"&lt;/P&gt;&lt;P&gt;templates = survey.report_templates&lt;/P&gt;&lt;P&gt;survey.generate_report(templates[template], where_clause, utc_offset, report_title)&lt;/P&gt;&lt;P&gt;for x in survey.reports:&lt;/P&gt;&lt;P&gt;if survey_id in x.description:&lt;/P&gt;&lt;P&gt;data_item = gis.content.get(x.id)&lt;/P&gt;&lt;P&gt;data_item.download(save_path=r'DownloadFolderPath')&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2020 19:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-python-module-feature-report-names/m-p/1007174#M31442</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-05T19:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Python Module Feature Report Names</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-python-module-feature-report-names/m-p/1008495#M31545</link>
      <description>&lt;P&gt;I'm experiencing the same&amp;nbsp;&lt;SPAN&gt;498 Invalid token&lt;/SPAN&gt; error message.&amp;nbsp; My&amp;nbsp;&lt;SPAN&gt;script was working until a recent problem occurred&amp;nbsp;when trying to run Feature Reports in Survey 123 Web app (&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/item-specified-by-surveyitemid-does-not-exist-or-is-not/td-p/850739" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-questions/item-specified-by-surveyitemid-does-not-exist-or-is-not/td-p/850739&lt;/A&gt;). For about a week some users we were not able to run Feature Reports in the S123 Web app.&amp;nbsp; Within a week ESRI released a fix that corrected the issue however since then I have not been able to use the&amp;nbsp;ArcGIS API for Python.&lt;BR /&gt;&lt;BR /&gt;I also would like the ability to control the report file name.&amp;nbsp; I would use some of the survey results to specify&amp;nbsp;a report name (i.e. Job number, user name, etc).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-python-module-feature-report-names/m-p/1008495#M31545</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-10T15:29:36Z</dc:date>
    </item>
  </channel>
</rss>

