Survey123 How to change default publish location?

2573
7
Jump to solution
03-28-2018 12:10 PM
MatthewDriscoll
MVP Regular Contributor

Using Survey123 Connect for ArcGIS. I have a survey which I originally published in the default location because I did not see any option to choose which folder to publish in.  I moved it to the correct group/folder for my organization so now when I re-publish it ends up in a never ending loop.  If I move it back to my home folder I am able to re-publish.   How do I tell Survey123 which folder I want to publish/re-publish to so I do not have to keep moving it? 

1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Hi Mathew

Survey123 will create a directory when publishing the survey and will give it the name Survey-<surveyName>. It will then create and place the form and and service items inside of it.

It is recommended that this folder structure is maintained - i.e. you should not move the form/service into other directories if you want to guarantee that things will work as expected.

Thanks

John 

View solution in original post

0 Kudos
7 Replies
JohnathanHasthorpe
Esri Regular Contributor

Hi Mathew

Survey123 will create a directory when publishing the survey and will give it the name Survey-<surveyName>. It will then create and place the form and and service items inside of it.

It is recommended that this folder structure is maintained - i.e. you should not move the form/service into other directories if you want to guarantee that things will work as expected.

Thanks

John 

View solution in original post

0 Kudos
Cristian_AndresGalindo_Londoño
Occasional Contributor III

Hello Johnathan, 

I have clone surveys from a portal to another, in that operation I have changed the folder of the survey, and it still works.

When I perform that operation I clone the form and the feature service and the layers.

But this is when I clone it.

As Matthew point, how to organize the content either AGOL or Portal if the surveys cannot be moved?

JohnathanHasthorpe
Esri Regular Contributor

Hi Cristian

In my comment above I was referring to the process of publishing a survey in Connect, then moving the form/service to another directory and then trying to republish the survey from Connect. This is not recommended.

In terms of cloning surveys things may be a little different. Can you share the process that you are using to clone the surveys and move them to another portal? Are you republishing the services too, or are the forms pointing to an existing service?

Thanks

John

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Please see the following idea relating to this:  

0 Kudos
ChadChurchill
New Contributor II

I have found that by modifying the survey ".itemInfo" file to reference a different "ownerFolder" id, a survey form can be moved out of the auto-created "Survey-<surveyName>” folder and placed into the folder of your choice, all while still allowing for updates to be successfully republished.

Process:

Open Survey123 Connect for ArcGIS, choose the survey you wish to update, click the ‘Open Survey Content File’, this will open your file browser to: C:\Users\<username>\ArcGIS\My Survey Designs\<surveyname>

 

Open the <surveyname>.itemInfo file with a text editor and look for the line that begins with “ownerFolder”, (this is line 34 in notepad++) the value that follows will need to be updated with the id of the folder you wish to move the survey form to.

The line should look like the following:

"ownerFolder": "zzz6e9697722414884a649b63e84408z",

Next, open ArcGIS Pro (assuming version. 2.1.2), open the python window and enter the following code to generate a list of folder names and id’s, given AGOL credentials.

import arcgis
gisTEMP = arcgis.GIS("<AGOL_URL>", "<username>", "<password>")
gisUser = arcgis.gis.User(gisTEMP, "<username>")
for fld in gisUser.folders:
    print(fld['id'], fld['title'])‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

*make sure to replace the <values> with your values

 

Copy the id of the folder you wish to move the survey form to, and paste it into the .itemInfo file, replacing the original ‘id’. Save the .itemInfo file. (You may wish to make a copy of the .itemInfo file first)

In AGOL you can now move the survey form to the new folder. (the one which matches the id used to update the .itemInfo file)

Since the .itemInfo file has been updated, when the survey is republished (using Survey123 Connect) it will reference the new folder location.

HuongTran1
New Contributor III

You can also get the folder ID from Pro open catalog, portal tab and hover over the folder

MatthijsAlberts
New Contributor II

You can also select the folder from AGOL in your browser and copy and paste the ID from the url.