AnsweredAssumed Answered

Help with the Download Service with Attachments.py script

Question asked by Ernestocd on Feb 12, 2016

I am using Survey123 to publish the Feature Service and following the instructions as described in the blog and documentation. I am sharing it with the Field Crew group that I created in my Organization, as well as my organization. I am enabling the Sync function as well.

 

I am planning on downloading the data every other day using the script to load it into a temporary database which then appends it to the main database of the same structure (feature class, table, and relationships, and domains). In this process, I append both the geometry and the table record. After this, I use the main database to overwrite an existing map service, and later delete the rows from the feature service generated with Survery123 in order to avoid duplicates the next time the script is executed.

 

Issue and Findings:

I have tested the script as a script model and as a python script and the same behavior occurs randomly. Sometime it works but after a few successful runs, it starts failing again.

 

I have also tested creating & downloading the FileGDB from ArcGIS Online. The attachments work as expected – something that was not acquired with the scripts mentioned above – but when appended to another FC, the same corrupted behavior is experienced. Also, the attachments won’t work anymore.

 

Another issue is, after testing the download with attachment script, the GlobalID_Str value started to become Null after a few test runs. Also, the match table is empty.

 

GlobalID changes when the downloaded layer with attachments is appended to another FC.

 

see - Original FC

see - Append FC

 

The same behavior occurs with the __ATTCH table

 

see - Original Table

see - Append Table

 

Tools and more info:

https://community.esri.com/docs/DOC-6496

https://community.esri.com/servlet/JiveServlet/download/6496-6-153147/Download%20Service.zip

Outcomes