Hello everyone - I had a working script to generate reports on demand in survey123.
But it stopped working. So I went back to basics, started new, followed the example data... And I keep getting "none" as a response. Except once in awhile- it actually outputs something.
I removed Identifying Items in the code below - to see the output, look at the attachments.
It runs fine if I manually trigger it from Survey123
and in my screengrabs, I know the output path is formatted wrong - It will get fixed once it runs as it should.
This is my Initial notebook cell:
import arcgis
import arcgis.apps.survey123
from arcgis.gis import GIS
from arcgis.apps.survey123 import SurveyManager
gis = GIS("home")
survey_manager = SurveyManager(gis)
print (survey_manager)
________________________________
This is my second notebook cell
survey_id = 'IDnumber'
report_template = gis.content.get('IDnumber')
survey_item = gis.content.get(survey_id)
svy_obj = survey_manager.get(survey_id)
print(report_template)
print(survey_item)
print (svy_obj)
report_file = svy_obj.generate_report(report_template=report_template,
report_title="LessThan20_Report",
output_format="docx",
save_folder=r"downloadpath")
print (report_file)
_______________________