I created a collection in Survey 123 but when it publishes it stores the table and attachements in ArcGIS Online. This is not much of an issues other than the fact that I need to Join this table to data that is on my local SDE environment. I cant seem to figure that part out.
In the attachment table I have this
ATTACHMENTID, REL_GLOBALID, CONTENT_TYPE, ATT_NAME, DATA_SIZE, DATA, GLOBALID
I was expecting rowid in the feature class, not the attachment table. Can you compare the field listing at the feature service endpoint against the list of fields created in the table?
Only differences I can see. No rowID in the Feature Class
SDE FC AGO
OBJECTID objectid
SYS_TRANSFER_DATE
Does this error point to line 556? ugggg
Creating Feature Classes & Tables
-Created BR_Boat_Ramp_Inspection_2
-Creating Relationships
-Adding records
-Finding Attachments
-Boat_Ramp_Inspection_2 > BR_Boat_Ramp_Inspection_2
-Field Map
-Boat_Ramp_Inspection_2
-Adding attachments
======================
FAIL: Updating Tables
exception:
A column was specified that does not exist.
['A column was specified that does not exist.']
<type 'exceptions.RuntimeError'>
556
----------------------
arcpy messages:
======================
Failed script SyncData...
This is what is created via the script until the error (See attachment)...It creates the FC and Attachment table. The FC Table has all the records (I remove all but one), while the attachment table has nothing but the fields. NO data was written to the Attachment table.
There is NO 'rowid' field...nothing looks out of the ordinary....very confused here....still getting the error in my previous post.
Any help would be greatly appreciated...
Okay, it looks like a field that is created when a repeat is in the survey isn't created when the survey doesn't have a repeat. I'll need to modify the script to catch that and create a rowid field, as it's needed to ensure the photo data can be synced.
As it turns out, that part is already in the code, just set up for repeats, not parent forms. Around line 243 of the python file, there is:
if 'parentrowid' in originFieldNames and 'rowid' not in originFieldNames:
Change that to:
if 'rowid' not in originFieldNames:
It was looking good then this....ugg...I thank you very much for taking the time to help with this. Getting closer
Not sure what this error is referring to?
-Creating Feature Classes & Tables
-Created BR_Boat_Ramp_Inspection_2
-Creating Relationships
-Adding records
-Finding Attachments
-Boat_Ramp_Inspection_2 > BR_Boat_Ramp_Inspection_2
-Field Map
-Boat_Ramp_Inspection_2
-Adding attachments
Failed script SyncData...
Traceback (most recent call last):
File "C:\Users\adminjk\Desktop\PythonSync\SyncBoatRamps.py", line 588, in <module>
main()
File "C:\Users\adminjk\Desktop\PythonSync\SyncBoatRamps.py", line 583, in main
arcpy.SetParameterAsText(7, sde_conn)
File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\__init__.py", line 670, in SetParameterAsText
return gp.setParameterAsText(index, text)
File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\geoprocessing\_base.py", line 231, in setParameterAsText
self._gp.SetParameterAsText(*gp_fixargs(args, True)))
RuntimeError: Object: Error in setting parameter as text
Failed to execute (SyncData).
Failed at Wed Nov 09 10:16:17 2016 (Elapsed Time: 2 minutes 9 seconds)
Everything seems to be ok but am still getting the error above...not sure why. I get the FC and the attachments records and the relationship class. I was able to see the records and images in ArcDesktop.
What does the above error have to deal with? Thoughts?
Hi Jay,
Apologies for being less responsive - I've been tied down with other tasks. I'm going to do some testing with the script and get back to you on this tomorrow.