Moving Surveys from ArcGIS Online to our Enterprise Portal

4752
11
04-26-2019 01:07 PM
LouGallops
New Contributor

I am looking for Rules that will help Move Surveys from ArcGIS Online to out Enterprise Portal.   

  • Is there documentation on this process?  
  •  Are there tools or utilities that help pre-check the Online surveys for Suitability on the Enterprise Portal?
  • Is there a Troubleshooting Aid to help determine the causes of Error Codes?

Any guidance will be  appreciated.    

0 Kudos
11 Replies
by Anonymous User
Not applicable

Hi Lou,

How were the surveys created? In Connect or Web Designer?

Do you have existing production data in the feature service? Are you wanting to move the feature service as well as the survey Form item?

Phil.

0 Kudos
LouGallops
New Contributor

Hello Phil,

Thanks for your time to respond.

The survey was created using excel in connect. I have existing test data in the feature service not production so a new feature service can be created and I can reconfigure the layer as necessary.

Best Regards,

Lou

0 Kudos
by Anonymous User
Not applicable

Hi Lou,

Yes, in that case the best option is to create a new FS and Survey in the new Portal, and not try to copy/migrate the currently published one over as there are a few limitations and workarounds that take longer than trying to create new again.

Phil.

0 Kudos
AudreyEdwards
New Contributor

The original question is over a year old so I wanted to know if there were any updates on moving existing surveys created in both Web and Connect, with and without feature services, from Online to Portal.

Thanks!

Audrey

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello Audrey Edwards‌, 

The ArcGIS API for Python has a function called `clone_items` within the content manager. This function can be used to move existing surveys created in both the Web Designer and ArcGIS Survey123 Connect. 

Please use this link for more information on using the `clone_items` function: Cloning Content | ArcGIS for Developers 

We are working on creating some samples that showcase this workflow with the goal of writing a blog on the workflow. 

I have attached two samples that we have so far to clone content from either ArcGIS Online to ArcGIS Online, ArcGIS Online to ArcGIS Enterprise, ArcGIS Enterprise to ArcGIS Enterprise, or ArcGIS Enterprise to ArcGIS Online. 

Please note these scripts are a work in progress and it is highly highly recommended to save your survey as a new survey and test the script against the test survey to confirm everything functions as expected. I have tested both using ArcGIS Online to ArcGIS Online and ArcGIS Online to ArcGIS Enterprise using a survey published from both the Web and Connect, but not the rest of the Portal scenarios and not with registered Feature Services in Enterprise (yet). 

The first script (Clone_Survey_Content_Full_Folder) takes the folder associated with the survey and clones all the content in the folder to a folder with the same name in the destination Portal. 

The second script (Clone_Survey_Content_Related_Item) takes the content that has a relationship with the Form Item and clones the content to a folder with the same name in the destination Portal. 

If all of your Survey content is in the same folder great the Clone_Survey_Content_Full_Folder script should work for you, but if your Survey content is located in a few different places the Clone_Survey_Content_Related_Item may be the better option. 

All you should need to do in the scripts is add the Item ID for the Survey Form Item in your content, specify the username and password for both the origin and destination Portals, and if needed add your ArcGIS Enterprise Portal URL in the appropriate GIS connection. 

Thank you, 

Zach

Thank you,
Zach
PaulCone2
Occasional Contributor III

Any update on writing a blog post on this?  Also, how can this script work with orgs that use single sign-on with Microsoft Office 365?  (Maybe that is a different blog post?)

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @PaulCone2

Here is the link to the blog post which contains the updated script. We also host the script and a number of others on our Survey123-tools github repo

As for working with SSO orgs the script uses the ArcGIS API for Python for authentication, please use this link for their documentation on working with different authentication schemes. You would need to create an application in your organization and use the client ID from that application in your GIS connection. 

Thank you, 

Zach

Thank you,
Zach
0 Kudos
MarcusVDSilva
New Contributor II

Hello, @ZacharySutherby

We have tried to run the script using three different forms. But we are getting 3 error messages (listed bellow), one for each form. They are just simple examples, with one or two questions, just created to test the script.
Any ideas on what we might be missing?

Thanks in advance!

Marcus

Error messages:

  • arcgis._impl.common._clone._ItemCreateException: ("Failed to create Form Test_Clone_Items: Failed to update Form Test_Clone_Items: 'charmap' codec can't decode byte 0x8d in position 1639: character maps to <undefined>", <Item title:"Test_Clone_Items" type:Form owner:portaladmin>)
  • arcgis._impl.common._clone._ItemCreateException: ('Failed to create Form Test_Clone_Items_Connect: Failed to update Form Test_Clone_Items_Connect: mismatched tag: line 5, column 197', <Item title:"Test_Clone_Items_Connect" type:Form owner:portaladmin>)
  • arcgis._impl.common._clone._ItemCreateException: ('Failed to create Form Testemigracao: File is not a zip file', <Item title:"Testemigracao" type:Form owner:portaladmin>)
0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @MarcusVDSilva

The first error message is typically returned when there are special characters in the survey. For example in the manhole community sample one of the choice lists has these special characters as the choice labels: 

ZacharySutherby_0-1645036770514.png

These characters will cause the error message and has been logged as BUG-000146678. 

 

For the second two errors would I be able to obtain a copy of the XLSForms used to create the surveys for testing on our end? 

 

Thank you,
Zach
0 Kudos