Hello,
I'm currently having a couple issues regarding my survey that is published through our portal.
1. I'm currently getting an error when I try to submit a survey response to my survey that is stored in our portal. I've attached an image of the error I received. I think it may have to do with repeats? I quickly made a different test survey without repeats, published it to our portal, and was able to submit responses without error. I was also able to use the original survey and publish it to ArcGIS online and that worked too, just not with portal.
2. My second problem is with using the "sync a hosted feature service to a geodatabase" python script created by Esri. I keep receiving an error "invalid SQL query" when trying to sync a survey stored on portal to an sde database. However, when I tried syncing from the same survey through ArcGIS Online I was able to sync. Is it a time zone thing? I have attached the error I received.
Thanks,
Pete
Hi Peter,
For the first issue, can you share the form that is not working?
I don't believe the second issue is a time zone issue. Can you check the list of fields and doublecheck the editor tracking field name 'CreationDate'? It may be in lowercase or have an underscore in it - you would need to modify the script to match the field name.
Hi James,
Thanks for your reply. I managed to get the survey to publish correctly. Also, you were right about the editor tracking field the script had 'CreationDate' but my table's field had 'created_date' as the name. I just had one more question that maybe you could help me with. The script works great for me however there are a couple modifications i would like to make to it however my python skills aren't quite up to snuff. There is a section of the script that creates the feature classes and when it does so it uses the name of the feature service but I'm finding this name to be too long. When I run the scrip it creates these feature classes in our SDE database, how can I modify the script to not include the name of the feature service (not include the bold sections illustrated below)?
S123.GIS.FieldObservations_service__7d1a4e3c0fe4ac7b8532ea95d_field_observation
S123.GIS.FieldObservations_service__7d1a4e3c0fe4ac7b8532ea95d_fw_observation
S123.GIS.FieldObservations_service__7d1a4e3c0fe4ac7b8532ea95d_fw_observation__ATTACH
S123.GIS.FieldObservations_service__7d1a4e3c0fe4ac7b8532ea95d_fw_observation__ATTACHREL
Thank you for your continued support on Survey123!
Best,
Pete
Hi Peter,
You would need to rename the tables as part of the script - the service__<GUID> is part of the table name in the hosted feature service (this is to ensure a unique table name).
Thanks for the reply, James. I also have another question about attachments. When I run the script the attachments don't seem to get appended to the attachment table?