Summary
In some instances, a new question is required to be added to a published survey to keep the data collection up to date and improve the objectives of the survey. However, adding a new question to a published survey and republishing it in ArcGIS Survey123 Connect may result in a loss of existing data. Hence, to avoid deleting existing data, it is a good practice to add the question as a new field in the hosted feature layer of the survey in the ArcGIS Online account where the survey form is published.
Procedure
- In ArcGIS Online, add a new field to the hosted feature layer of the survey.
- Log in to ArcGIS Online with the same credentials used in ArcGIS Survey123.
- Click Content > My Content.
- In the My Content section, navigate to the survey folder and open it.
- Identify the hosted feature layer of the survey. Click More Options
and select Open in Map Viewer.
- In Map Viewer, navigate to the layer in the Contents pane, and click Show Table
to display the attribute table. In this example, questions of the existing survey are displayed as fields in the attribute table of its hosted feature layer.
- In the attribute table, click Options
, and select Add Field. - In the Add Field window, specify Field Name. In this example, the field name is 'suggestion'.
- Specify the Display Name, and select the field type from the Type drop-down list. In this example, String is selected.
- Click ADD NEW FIELD.
- In ArcGIS Survey123 Connect, update the question in the survey.
- Log in to ArcGIS Survey123 Connect, browse to, and double-click the survey to view it.
- Click XLSForm
to open the XLSForm file of the survey. - In the survey worksheet, in the type column, click the drop-down arrow in a blank cell, and select the desired question type. In this example, text is selected.
- In the name and label columns, specify the name of the question. Ensure the name and label columns in the XLSForm have the same values as the Field Name and Display Name specified in Steps 1(g) through 1(h).
- Click Save
.
- Republish the survey.
- Click Publish survey
. - In the Publish <survey_title> window, click Publish survey.
- In the Publishing <survey_title> window, click OK. The survey is published, and the new question is reflected in the ArcGIS Online hosted feature layer.
The image below shows the survey is updated with the new question, and the existing data is preserved after republishing.