Hi There,
I am using a function which will check if there is a template already with same name, update it or else upload it.
I first upload this template and when I re-upload it, it showed an error which was understandable that template already exists.
But when I use this update_report_template function, I provide it with filename, and tried different ways but it always throws me this error.
Code and error provided below
gis = GIS(AGOL_ORG_URL, AGOL_USERNAME, AGOL_PASSWORD)
survey_manager = arcgis.apps.survey123.SurveyManager(gis)
survey_by_id = survey_manager.get(survey_id)
template_file = "Template v6.docx"
update = survey_by_id.update_report_template(template_file)
Getting this error:
update = template_item[0].update(item_properties={}, data=template_file)
IndexError: list index out of range