How To: Configure an installed ArcGIS Survey123 website in disconnected environments
This article is intended for users who have already installed and configured the ArcGIS Survey123 website in their environment. The ArcGIS Survey123 website installer must be downloaded from the My Esri website. For more information on running and configuring the ArcGIS Survey123 website installation, refer to the article: How To: Install and configure the ArcGIS Survey123 website
The ArcGIS Survey123 website installer requires additional manual steps to properly configure it for use in completely disconnected environments with no access to the internet. The requirements are:
- Pointing ArcGIS Survey123 Connect to ArcGIS Enterprise portal hosted content (for example, survey templates and samples).
- Disabling internet requests to access other content such as tutorials, such as GeoNet and Twitter.
- Updating the ArcGIS Enterprise portal settings, so the survey form items are opened and managed in the installed ArcGIS Survey123 website rather than survey123.arcgis.com.
ArcGIS Enterprise portal hosted content
ArcGIS Survey123 Connect provides form templates and samples to survey authors for use as a base to create new surveys. By default, ArcGIS Survey123 Connect attempts to access these templates and samples in survey123.arcgis.com, which is not possible in a disconnected environment.
The solution is to manually upload the form templates and samples to ArcGIS Enterprise portal, share them to a group, and set the ArcGIS Survey123 Organization properties to point ArcGIS Survey123 Connect to access them. Esri provides a Python script and SQLite database to automate this process, but it can also be done manually if desired.
The script does the following:
- Uploads the forms contained in the forms.db database to ArcGIS Enterprise portal. By default, these are placed in a new folder called Admin: Survey123 Templates
- Creates six new groups: Survey123 Connect Blank Templates, Survey123 Connect Esri Templates, Survey123 Connect Esri Samples, Survey123 Connect Community Templates, Survey123 Web Designer Esri Templates, and Survey123 Web Designer Community Templates
- Shares the uploaded forms to the appropriate group
- Populates the ArcGIS Survey123 Organization properties using the appropriate groupIDs, for example:
"templatesGroupQuery": "id:9a26557f64ef4584931a6b28814bc766" "samplesGroupQuery": "id:a81fa0016af24a5ab9939990ffb589f3" "esriTemplatesConnectGroupQuery": "id:738029d818674f45b9d91aee70e92d58", "esriTemplatesWebsiteGroupQuery": "id:2af4f1919ef54f40abf898c8a0487b99", "communityTemplatesConnectGroupQuery": "id:d345218237c9487484c98dbaf82d3404", "communityTemplatesWebsiteGroupQuery": "id:93e1a6ebb65941368622406015c1e155"
The following are instructions to run the Python script to configure the ArcGIS Survey123 website offline capability. The uploadForms.py Python script is designed to run on a machine with ArcGIS API for Python installed.
Note: ArcGIS Pro 2.1 and later releases ship with conda and the arcgis package pre-installed. There is a common issue when using arcgis package version 1.7.0. Therefore, upgrade to arcgis package version 1.7.1.
- Download uploadForms.zip, and extract the uploadForms.py and forms.db files to a new folder on a machine running ArcGIS API for Python.
- Ensure the Python installation with the arcgis package has been added to the Path system environment variable.
- Open a Command Prompt, and change the directory to the folder containing the script and database.
- Enter the appropriate command to run the script depending on the ArcGIS Enterprise portal’s authentication method. The following is a basic format of the command to run the script:
Note: The account used to run this script is the owner of the uploaded forms. This means the uploaded content are displayed in the ArcGIS Survey123 Connect gallery of that account. Given the large number of forms, Esri recommends running the script from an account that is not used for ArcGIS Survey123 Connect.
python uploadForms.py <portal_url> <auth_method>It is also possible to specify optional parameters if required. Below is the list of <required> and [optional] parameters along with a short explanation for each component:
<portal_url> <auth_method> --folder [folder_name] --username [username] --cert_file [certificate] --password [password] --key_file [key_file] --client_id [client_id]
- portal_url: The portal to upload the forms to.
- auth_method: The authentication method to use with the portal: user_pass, pki, iwa, saml, pro. The last option, pro, uses an active ArcGIS Pro connection in the environment regardless the specified <portal_url> parameter.
- folder: Folder to place the forms in. This is created with a default name of Admin: Survey123 Templates if there is not a specified existing folder.
- username: Username for the user_pass authentication method.
- cert_file: Certificate file for the pki authentication method.
- password: Password for the user_pass or pki authentication method.
- key_file: Certificate key file for the pki authentication method.
- client_id: App ClientID for the saml authentication method.
The image below specifies iwa as the authentication method. This method, and pro do not require any additional parameters.
The image below is an example of the command to run the script with the user_pass authentication method which requires additional parameters for the username and password.
- Check the ArcGIS Survey123 Organization properties, and manually make desired changes using the Organization Properties editor included in ArcGIS Survey123 Connect. Refer to the the 'Disable other internet requests' section below for more details.
Note: Use ArcGIS Survey123 Connect 3.10 and above to read the group query Organization Properties, so any new surveys can utilize the locally hosted survey templates and samples in a disconnected environment.
Disable other internet requests
ArcGIS Survey123 Connect makes internet requests to access other content such as tutorial videos, GeoNet and Twitter. These requests can be disabled by setting two ArcGIS Survey123 Organization properties, showTutorialContent and showCommunityContent. These properties are automatically set during the post installation wizard via the question, 'Are you installing the Survey123 website in a disconnected environment with no internet access?' Depending on the ArcGIS Enterprise deployment, a manual post installation may have been necessary which means this setting has not been updated.
Follow the steps below to manually set these properties using the Organization Properties editor included in ArcGIS Survey123 Connect.
- Open ArcGIS Survey123 Connect, and sign in using an account with administrator privileges.
- Click Settings. Click and hold Survey123 Connect Settings for a few seconds. Refer to the short video on this:
Organizational Settings in Survey123 Connect
- In the Survey123 Connect Settings window, click Organization. The settings are stored in a JSON-formatted text. Add the following text to disable both the Tutorials and Community content, and associated internet requests.
Note: Properties must be separated with a comma. For example, "showTutorialContent": false, "showCommunityContent": false.
- Click Update. Check if the updates are successful.
The Tutorials and Community tabs are no longer available in ArcGIS Survey123 Connect.
Update the ArcGIS Enterprise portal survey item links
There are three Open in Survey123 links available in ArcGIS Enterprise portal to launch survey content, and these links use https://survey123.arcgis.com by default.
To use the installed ArcGIS Survey123 website host URL, follow the instructions below:
- Log in to the machine hosting Portal for ArcGIS.
- Navigate to the portal's installation folder. By default, this is C:\Program Files\ArcGIS\Portal.
- Locate the GeoConfig object in ~\ArcGIS\Portal\customizations\<VERSION NUMBER>\framework\webapps\arcgis#home\js\arcgisonline\config.js.
- Run a text editor as an administrator, and open the config.js file.
- In the config.js file, search for surveyUrl (this has been present since Portal for ArcGIS 10.7.1) and substitute survey123.arcgis.com with the installed ArcGIS Survey123 website host URL. This is the URL used to access the installed ArcGIS Survey123 website including any port numbers, or reverse proxy access point if there is one configured.
- Save the config.js file.
- Restart Portal for ArcGIS Windows service for the changes to take effect.
Ensure the Open in Survey123 app, Manage in Survey123 website, and Edit in Survey123 Connect links utilize the installed ArcGIS Survey123 website host URL.
- How To: Install and configure the Survey123 website
- How To: Set up a reverse proxy for an installed ArcGIS Survey123 website
- My Esri
Last Published: 11/4/2022
Article ID: 000023968
Software: ArcGIS Survey123 Website Current ArcGIS Survey123 Connect 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.15, 3.14, 3.13, 3.12, 3.11, 3.10, 3.1, 3.0, 2.9.Classic, 2.8