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.
Hi Jay,
Relationship classes can only be created between tables and feature classes within the same geodatabase.
In terms of migrating your Survey123 data to an enterprise geodatabase, we're just finishing up a blog post describing it; in the meantime, you could try out a sample script designed to synchronize the data - GitHub - tedrick/SyncSurvey: Synchronize a Hosted Featuer Service to an Enterprise Geodatabase (it's not foolproof; another user was having some issues that I had trouble replicating).
In terms of the survey going directly to your own ArcGIS Server service, it's a planned expansion of the the submission_url property of the survey - Submission URL—Survey123 for ArcGIS | ArcGIS . Currently submission_url only supports other hosted services, whether using Portal or ArcGIS Online.
First off thanks fro the response...Much Appreciated.
So if I get you right....Synchronize the data portion of you response. I would have a second copy of the Survey123 FS on my EGDB and simply sync the two. When Survey123 updates the copy on my EGDB would update as well.
Is that what you are getting at?
EDIT: I haven't checked but does this sync Attachments as well....I have a bunch of images attached to each record in Survey123 FC
The synchronization script downloads the data in the Survey123 Feature Service and then creates/updates a set of tables in the EGDB. It maintains relationships and attachments.
OK thanks...gonna give that a try.
I assume that I have to create a scheduled Task every few hours to run the script?
Question:
Where and how do I specify the exact folder in AGO that the feature class resides?
I see the get Token getToken(username, password=None, portal_URL = 'https://www.arcgis.com'
but dont see where I am grabbing the specific workspace (folder) in AGO that was created by Survey123
Hi Jay
You can actually use the submission_url for a feature service in you\r own server environment. We have it working here in our 10.3.1 environment but there are a few "tricks" to get it working.
Essentially this is the procedure to follow:
1. Create the survey as per normal using survey 123 connect in portal/online.
2. In portal/online navigate to the hosed feature service created for the survey and export it as a file geodatabase. Download the file geodatabase to you local system.
3. In the downloaded File geodatabase create a new featureclass. Check the box "Coordinates include Z values". This is important and is a bug with survey 123. Select WGS84 as the coordinate system and for the attributes import the schema from the featureclass downloaded from online/portal.
4. Enable Editor tracking on the featureclass.
5. Create attachments for the featureclass.
6. Optional. when a survey is created it creates a whole lot of domains. We like to keep thinks ordered so we prefix all the domains with the survey name so we can manage them better. So if you want go to the file geodatabase properties page and rename (prefix) the domains.
7. Copy the featureclass into your own sde instance. This will copy the attachment relationship class and table as well as the domains.
8. Publish the featureclass as a feature service to your own internal ArcGIS Server. Make sure you check the box "Apply default z-value" on the Feature Access properties page.
9. Take a copy of your survey xlsx you first published and open it in excel. On the Settings Tab you can create a column called "submission_url" and in the first cell under the heading under in the url to your feature service.
10. Publish the new survey using the xls created above. This will create a new survey but there will be no associated hosted feature service. You will see a message advising that the survey has been configured to use a custom feature service submission_url
11. Test your survey and confirm that the data is being populated in your instance of SDE.
We have tested this procedure and have active survey published with the above method. I have not tested it using ArcGIS online as we have our own portal but I cannot see why it should not work using ArcGIS online as long as the feature service is visible.
Hope this helps...?
cheers
Callum
I am unable to reproduce this...
My survey gets hung at 'Creating form item' while publishing.
Did you have to enable z values in the schema via the xls or just in the FS?
Tucker
Are you trying to reproduce what I was working on earlier in the post or working from Callum's post? I can explain further and post full working of the export I was able to get working...
I am still getting an error of some sort but everything seems to be working. See my last post above...didn't hear back from James Tedrick for a potential solution to the last error...but things are working for me regardless of the error...
And THANK you again James for your help.
I am trying to replicate Callums workflow. If that works I will not need the the longer python workflow. It is my understanding that Callums workflow is not supported officially yet but will be by the end of the year.
Hi Tucker
You have to enable z-values on the featureclass and check the "use default values" on the feature service when publishing. You don't have to do anything in the survey xlsx except enter the submission url. We have used this process for a number of surveys we have here and it is working well. We are using portal/server 10.3.1. What version are you using or are you using online?
I am running 10.4.1.
I did enable z values. Not sure where I went wrong but this should be officially supported within a month. Guess I will wait...
Does this work if you don't have your own portal setup? I've tried your steps and use the url for the service but when I publish the survey it says The custom feature service submission url is not compatible with this survey (Request error) and I did read in ESRI's documentation that it doesn't work with just an ArcGIS Server Service.
Hi Priscilla,
The submission_url will not work with an ArcGIS Server service that does not participate in Portal federation. We will be soon documenting a workaround, but that will still require a Portal or ArcGIS Online account.
If we are storing Are Survey123 data in a local SDE instance, then what is the purpose of the ArcGIS Data Store in this architecture? Survey123 is communicating with a Feature Service on Portal for ArcGIS which is how the ArcGIS Server Feature Service is exposed to ArcGIS Apps. Behind that is a feature class in a geodatabase. There's no active involvement of the ArcGIS Data Store in this scenario, is there?
The reason I ask is that in our environment (per Esri recommendation), the ArcGIS Data Store is sitting on two VM that have a monthly cost. We're not using the ArcGIS Data Store for anything else (hosted tile services, hosted feature services, etc.) and we have no immediate plan to utilize the Data Store. It's difficult to justify to our managers the expense of the Data Store when all it is doing is allowing the Survey123 an initial connection to our federated Portal for ArcGIS.
If there is a workaround so that we do not need the Data Store? - that Survey123 communicates directly with Portal for ArcGIS which is really what the URL submission is giving us. We'd sure would like to know it there is.
TIA
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.