Select to view content in your preferred language

Store Survey 123 Table in local SDE

8127
52
11-02-2016 01:39 PM
jaykapalczynski
Honored Contributor

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.

  1. Can I create a Relationship Class to a table created from Survey 123 that resides in ArcGIS online to a local Feature Class in my local servers SDE.
  2. Can I move the location of the table and Attachments created by Survey123 to my local SDE Server?
    1. Is there some sort of setting that forces the creation of tables etc to my server not ArcGIS Online?
    2. Set a workspace to my server instead of ArcGIS online????
  3. Can I create a Relationship class in ArcGIS online that relates the table created in Survey123 (located in AGO) to a feature class on my local server?
52 Replies
jaykapalczynski
Honored Contributor

Right on James....much appreciated for any help you can give....as I stated it seems the download worked but still throwing an error...I have the FC, Attachment table, and relationship class but the error is thrown...Thanks

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Jay,

Again apologies for not getting back to this quicker.  I've made some updates to the script (including the manual fixes I applied above).  Can you redownload it and try again?

0 Kudos
CallumSmith2
Regular Contributor

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

TL2
by
Frequent Contributor

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?

0 Kudos
jaykapalczynski
Honored Contributor

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.

0 Kudos
TL2
by
Frequent Contributor

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.

0 Kudos
jaykapalczynski
Honored Contributor

just seems very hands on and manual.....the python script I have working is fully automated and does all of that....run it on a scheduled task and leave it.  have any questions let me know....good luck

0 Kudos
CallumSmith2
Regular Contributor

Hi Jay

Yes it is a bit manual but you onlu have to do it once. If you follow the procedure and set your survey up with a submission_url the data will be stored in sde. i.e. as soon as the survey is submitted the data will be in your sde featureclass you don't have to run any scripts.

We like that approach as it gives us more "flexibility" with the data moving forward in a enterprise gdb

cheers

Callum

0 Kudos
CallumSmith2
Regular Contributor

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?

Callum

0 Kudos
TL2
by
Frequent Contributor

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...

0 Kudos