Is there an easy way to update the keyword associated with an feature attachment?

1547
2
Jump to solution
03-22-2018 11:46 AM
SudhirPonnappan1
New Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
SudhirPonnappan1
New Contributor III

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

View solution in original post

2 Replies
by Anonymous User
Not applicable

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.

0 Kudos
SudhirPonnappan1
New Contributor III

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