I have an issue with getting attached images into the Survey123 Feature Report.
I have a hosted service in AGOL that I modified using Pro and re-published. Post this publish-activity I only get images belonging to new features (features added to the service post publication) into the feature report. Images for the “old” features are still there and can be viewed both in the service and in Survey123 web app (data section). But somehow the images corresponding to the “old” features are not attached in the feature report.
So, for the "old" features the getValue:"count" returns 0 and no images are attached to the report but everything is working as expected for new features.
Any ideas of what might have happened and how to set this right is greatly appreciated.
ArcGIS Survey123 uses attachment keywords to associate what image corresponds to what image question in the form. Please use this link for more information on attachment keywords and how to identify them.
What probably happened was the keyword for your attachment changed at some point (potentially modifying the XLSForm for the survey) which is why the new images work because their keywords match what Survey123 is expecting but the old images may have a different keyword that does not match. The link posted above discusses how the keywords can be updated manually, the process of updating the keywords can also be automated using a Python script which we have a notebook that does update attachment keywords. The issue with our notebook that we have is it's geared towards a specific workflow in ArcGIS Enterprise and the way it runs now would not work for your scenario as it takes the name of the image and uses that as the keyword. Your images probably have the different keywords in their name so the notebook the way it's currently configured would do nothing some modification would need to be done to the notebook in order for it to work in your scenario.