Update a survey

A survey is composed of two parts: the form item that the app uses and the feature layer that contains the data submitted from the survey. You can update a survey that has been published.

Caution:

Surveys created with the Survey123 web designer use feature layer views. When working with surveys in Survey123 Connect that were created in the web designer, ensure that the feature layer view contains the fields needed.

If a survey has been created in Survey123 Connect from an existing feature layer (either an ArcGIS Server feature layer or hosted feature layer), new questions and choice list values can be added to the survey only after the corresponding field or domain is added to the feature layer.

After making changes to a survey, you can typically republish it without deleting and re-creating the feature layer. You can make the following changes to a published survey in the Survey123 web designer and Survey123 Connect without causing a loss of data:

  • Reorder questions
  • Update labels in questions
  • Update labels in groups
  • Update constraints, defaults, hints, and whether a question is required
  • Update calculations
  • Update choice filters (Survey123 Connect only)
  • Add or delete choices in lists
  • Delete questions and repeats
  • Add questions
  • Add notes
  • Add groups
  • Change question types (if the underlying field type is the same)
Note:

You cannot add repeats or update repeat names.

In some cases, republishing a survey updates the form item and deletes and re-creates the feature layer. When you republish, Survey123 Connect displays a warning if any of the changes you've made are not supported by the existing feature layer.

If you disregard the warning and republish, the original feature layer is deleted and replaced and all associated data is lost. Before replacing an existing survey, confirm that all unsent surveys have been submitted, and consider downloading the results of the original survey first.

When a survey is republished, Survey123 field app users must update their survey to see and work with the latest version.

Note:

Image, audio, and file questions cannot be added unless attachments are enabled for the feature layer. If a survey included an image, audio, or file question when it was created, attachments are already enabled.

Named note questions require a field in the feature layer. In versions earlier than Survey123 2.5, notes with a name but no calculation or default value didn't automatically generate a field in the feature layer on creation. If you republish a survey that contains a note question with a name but no calculation or default value, you are warned and given the option to add fields when you publish. Notes without a name are ignored by the feature layer. You can also omit named note questions from the feature layer by setting bind::esri:fieldType to null.

Renaming a question creates a field in the feature layer under the new name. The old field is retained in the feature layer, so before republishing, it is recommended that you review its contents and either copy the data to the new field or delete it.

Changing the case of a question name only—for example, changing the name from siteid to SiteID—causes the feature layer to be deleted and re-created when the survey is republished.

Field aliases

When a survey is first published, a question's label becomes the alias for its field in the feature layer. When you modify question labels and republish the survey, Survey123 Connect displays a summary of the changes and allows you to decide whether these changes should be applied to the field aliases in the feature layer. Consider the following when updating question labels:

  • If a question has a value in the bind::esri:fieldAlias column, this value will always be used as the field's alias.
  • For surveys that use a submission URL, field aliases will not be updated and no summary of the changes will be shown.

Choice lists

When you modify the choices for select_one questions and republish the survey, Survey123 Connect displays a summary of the changes and allows you to decide whether these changes should be applied to the coded value domains in the feature layer. Consider the following when updating choices for select_one questions:

  • Adding a choice, or updating the name for an existing choice, adds a domain value to the feature layer.
  • Updating the label for an existing choice updates the label for the existing domain value in the feature layer.
  • Deleting a choice from a choice list has no effect on the feature layer's domains.
  • If an addition or update to a choice list results in domain values that have duplicate labels, a warning appears in Survey123 Connect when republishing.
  • For surveys that use a submission URL, if there are choices that are missing from the feature layer's domains, a summary of the missing choices is displayed. You can republish the survey, but the domains will not be updated.