I am trying to find an easy way to specify a keyword that is associated with a feature attachment. In some instances, attachments are being added to the feature layer outside of suvery123 and a custom print template from the survey123 website is used to generate a printout of the survey.
In my research I have found the REST API add/update attachment would likely be the solution. I have a few hundred feature attachments that the keyword has to be specified. Has anyone scripted this before?
Solved! Go to Solution.
Hi Phil,
Thanks for your response. I was able to write a python script to upload attachments and specify a keyword using the ArcGIS Python API and the Python Requests module.
Attached is the script, in case someone else runs into this issue. Might not be the most efficient way, but got the job done.
Thanks,
Sudhir
Hi Sudhir,
I do not think it is possible to currently script the auto update of keywords for attachments via the REST API. However maybe someone else out there has come up with a solution that works?
Currently it is a known issue that attachments added to features via a webmap or other service (ie not via the Survey123 field app or web form) will not have keywords and therefore not be displayed correctly in the custom report print template which requires the keywords to associate the attachment with the correct question.
Phil.
Hi Phil,
Thanks for your response. I was able to write a python script to upload attachments and specify a keyword using the ArcGIS Python API and the Python Requests module.
Attached is the script, in case someone else runs into this issue. Might not be the most efficient way, but got the job done.
Thanks,
Sudhir