- In ArcGIS Online, unshare any survey forms from the Survey123 group which will not be cloned.
- Run the 3 attached queries in their Biotics instance Query Builder, exporting as csv files with the names: species.csv, higher_classification.csv, and location_use_class.csv.
- Update the files in the Observations (or appropriate) survey (and publish it) PRIOR to cloning or the updated files will not be included.
- Add/update the csv files within the survey folder in AGOL so that they are cloned as well.
- Share the contents of the survey folders EXCEPT THE FEATURE SERVICE(S) to the Survey123 group. ONLY share the Edit Dashboard as it and the others will need to be recreated. All contents within the group will be cloned, according to the group ID, in the second script.
In ArcGIS Pro, open Clone Surveys (Whitney) or create a new project (someone else).
If using a new project:
- From the Insert menu, from the New Notebook dropdown in the Project section, select Add Notebook.
- Download the attached Notebook file and save it to the project folder (i.e. C:\Users\username\Documents\ArcGIS\Projects\MyProject). Select the Notebook file (Clone Observation Surveys.ipynb).
- From the Catalog, expand Notebooks and open the Notebook by double-clicking or right-clicking and choosing OpenNotebook.
- Within the Notebook:
- In the first set of code, edit the target URL and user credentials to reflect the AGOL Organization to which the survey, etc. are being copied. The user needs to have Create privileges.
target = GIS(profile="https://csurams.maps.arcgis.com", username="username", password="password") - The second set of code references the Group ID for the Survey123 group. In AGOL, make sure that only the surveys which should be copied (Observations and Observations QC) are shared to this group. Share all items within the two surveys folders to the group.
group = source.groups.get('9dc4638b479240569466aa98a8ecfa6f') - The third set of code references the Observations survey form ID - change this to the form ID of the appropriate survey:
source_item_with_data = survey_manager.get("95f90acbe9d947658bc566d70ab0492a") - The fifth set of code (Repeat for Observations QC Survey) references the Observations QC survey form ID:
source_item_with_data = survey_manager.get("e212d7ecb415463ab826e58472ef1ced") - The seventh set of code (Repeat for paged version of the survey) references the survey form ID of the paged version.
- In the first set of code, edit the target URL and user credentials to reflect the AGOL Organization to which the survey, etc. are being copied. The user needs to have Create privileges.
- Click the topmost set of codes and click Run. Continue through each sequentially.
- Log into their AGOL Organization with the credentials provided and verify that the three folders (and contents) have been successfully created.
- In AGOL, delete the feature service which was copied during the cloning process - the one which is not hosted. If you did not share the feature service(s) with the Survey123 group, this will not be a problem.
- Log into Survey123 Connect as their user and download the main Observations survey.
- Link the csvs to the survey
- replace the Dataset value with that in their Biotics database, referencing the Observations survey
- Republish it, which will create a new feature service.
- In AGOL, get the item ID of the hosted Observations feature service.
- In Connect, edit both the paged & QC versions of the survey:
- in the Settings tab of the XLSform, update the item ID within the submission_URL to reflect that of the client's hosted Observations feature service.
- replace the Dataset value with that in their Biotics database, referencing the Observations survey
- link the csvs
- Publish the 2 surveys to reflect the updates.
- Edit the Observations Map:
- Replace the existing feature service (NatureServe) with the client's feature service.
- Remove the tables from the old feature service
- Turn off Visibility of the Observations layer
- Alter the Point symbology to match the color of the polys & lines.
- Save the Map.
- Create Dashboard from Map
- Copy the survey form ID of the Observations survey form, from the URL.
- Edit the Edit Dashboard to reconfigure the survey to point to the Observations layer & the survey form ID in the URL, within the new organization.
- Within the Edit Observations dashboard, edit the List, Photos & Recordings to point to the Observations layer within the Observations feature service.
- Once all is working within the Edit Observations dashboard, Save it. Save a Copy and call it View Observations. Save another copy and call it QC Observations.
- Edit the survey within the View Observations dashboard to reflect mode=view.
- Open the Observations QC form and copy the survey form ID from the URL.
- Edit the QC Observations and edit the survey to reflect the QC survey FORM ID.