English
Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

How To: Configure an installed ArcGIS Survey123 website in disconnected environments

Summary

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 initial release of 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.

Procedure

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 three new groups: Survey123 Templates, Survey123 Samples and Survey123 Community
  • 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"
"communityGroupQuery": "id:9a26557f64ef4584931a6b28814bc766"

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.
  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.
  2. Ensure the Python installation with the arcgis package has been added to the Path system environment variable.
  3. Open a Command Prompt, and change the directory to the folder containing the script and database.
  4. 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.

IWA authentication method.

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.

user_pass authentication method.
  1. 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.
ArcGIS Survey123 Organization properties.
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.

  1. Open ArcGIS Survey123 Connect, and sign in using an account with administrator privileges.
  2. Click Settings. Click and hold Survey123 Connect Settings for a few seconds. Refer to the short video on this:
    Organizational Settings in Survey123 Connect
  3. 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.
  1. Click Update. Check if the updates are successful.
Survey123 Organization properties.

The Tutorials and Community tabs are no longer available in ArcGIS Survey123 Connect.

The Tutorials and Community tabs are no longer available.

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.

Open Survey123 options in ArcGIS Enterprise portal.

To use the installed ArcGIS Survey123 website host URL, follow the instructions below:

  1. Log in to the machine hosting Portal for ArcGIS.
  2. Navigate to the portal's installation folder. By default, this is C:\Program Files\ArcGIS\Portal.
  3. Locate the GeoConfig object in ~\ArcGIS\Portal\customizations\<VERSION NUMBER>\framework\webapps\arcgis#home\js\arcgisonline\config.js.
  4. Run a text editor as an administrator, and open the config.js file.
  5. 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.
surveyUrl in the config.js file.
  1. Save the config.js file.
  2. Restart Portal for ArcGIS Windows service for the changes to take effect.

Ensure the Open in Survey123 appManage in Survey123 website, and Edit in Survey123 Connect links utilize the installed ArcGIS Survey123 website host URL.

Related Information

Last Published: 4/27/2022

Article ID: 000023968