English

How To: Prepopulate fields in Survey123 for ArcGIS by modifying a custom URL

Summary

The purpose of a custom Survey123 for ArcGIS URL scheme is for remotely launching the survey in Survey123 from other apps such as Explorer for ArcGIS, Collector for ArcGIS, or web maps in ArcGIS Online. In addition to launching the survey in Survey123, custom URLs can be used to prepopulate fields when the survey is launched.

Procedure

The custom URL scheme for launching a survey in Survey123 for ArcGIS follows the below syntax:

arcgis-survey123://?itemID=<item ID of the survey in survey123.arcgis.com>

In addition to launching Survey123 for ArcGIS, parameters can be added to populate fields in the survey. Parameters are separated using ampersands (&), and each parameter consists of two parts: the parameter name, and the parameter value. These are separated by an equal (=) sign.

Prepopulate a field

To launch a survey with a prepopulated field, modify the custom URL scheme. Follow the instructions provided below.

  1. Add the following parameter to the end of the URL, after the itemID:
    &field:<name of the field>=<value to be prepopulated>
    The following is an example of a custom URL scheme with a parameter that prepopulates a field:
    arcgis-survey123:///?itemID=8517ab8615754cac8c85c27bbbb3c04b&field:field1=Answer1
    Note:
    Use the value in the name column of the survey's XLSForm, and not the value in the label column.
  2. Insert the custom URL into Explorer for ArcGIS, Collector for ArcGIS, or a web map in ArcGIS Online to remotely launch the survey with the prepopulated field.

    Screenshot of the survey with one field populated with an answer.
Prepopulate multiple fields
To launch a survey with multiple fields prepopulated, follow the instructions provided below.
  1. Add the following parameter to the end of the URL, after the itemID:
    &field:<name of the field>=<value to be prepopulated>
  2. Add & before the next parameter:
    &field:<name of the field>=<value to be prepopulated>&field:<name of the field>=<value to be prepopulated>
    The following is an example of a custom URL scheme with parameters that prepopulate multiple fields:
    arcgis-survey123:///?itemID=8517ab8615754cac8c85c27bbbb3c04b&field:field1=Answer1&field:field2=Answer2
    Note:
    If the field has a value in the default column of the XLSForm, the value is replaced by the parameter value stated in the URL scheme.
  3. Repeat step 2 to add more parameters.
  4. Insert the custom URL into Explorer for ArcGIS, Collector for ArcGIS or web maps in ArcGIS Online to remotely launch the survey with the prepopulated fields.

    Screenshot of the survey with 2 fields populated

Related Information