Survey123 form change
The following guide is to help making changes to Survey123 forms that are configured to submit data to a feature service that is connected to a geodatabase. This would be indicated by a Feature Service item URL stored in the submission_url field in the XLSForm’s settings worksheet.
For more details on how to connect a survey123 form to a geodatabase structure, check this documentation.
Changes with No Impact on GDB
First of all, what can be changed in a Survey123 form with no impact to the geodatabase, i.e. no required changes on the data side:
- changes to the following Survey123 Excel file columns:
- label (Note that the field “aliases” are not updated in the geodatabase automatically but there is no functional requirement to change them)
- hint
- constraint
- constraint_message
- required
- required_message
- appearance
- default
- readonly
- relevant
- calculation
- choice_filter
- repeat_count
- media::audio
- media::image
- body::accuracyThreshold
- body::esri:inputMask
- (bind::esri:parameters) TO CHECK
- bind::saveIncomplete
- changes to the Settings page in Survey123 Connect for ArcGIS
- Thumbnail, Title, Summary, Description
- Style
- Map default settings
- Image settings
- Inbox settings
- Sent Surveys settings
- deleting a field (optional: deleting a field from geodatabase
- deleting a repeat (optional: deleting a related table from geodatabase)
Changes that must be made in the Geodatabse (GDB)
Now what changes in a Survey123 form have an impact to the geodatabase and involve modifications to the structure or configuration of the geodatabase.
Each possible change has a link in this document that provides step by step guidance on what to do to implement the change in the geodatabase
- changes to the following Survey123 Excel file columns:
- type
- text to integer
- integer to decimal
- … to …
- text to select_one - Note that text to select_one can be changed and reflected in the Field App without updating the GDB but the web view of the data will not use drop-downs unless the GDB change is made.
- name
- label (if the label change needs to be reflected in the geodatabase)
- bind::esri:fieldType
- bind::esri:fieldLength
- type
-
modifying a choice list (if the change needs to be reflected in the geodatabase e.g for use in a web app)
- adding a new repeat
Step by Step Guides
Change of type - old_type to new_type
The data between the fields must be compatible, meaning if you are changing from text to integer, all text values must already be integers, for example.
-
Stop all feature services using the impacted geodatabase table using ArcGIS Server Manager. If in doubt, stop the ArcGIS Server Windows service which will stop all map and feature services temporarily.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Click on and rename the old_type field
-
Save changes
-
Add a new_type field by clicking on the last line of the table
-
Enter the field name (same name as old_type field), the alias (same alias as old_type field), and Data Type (See the Data Type Conversion Table for more information)
-
Click “out” of the field to complete your edit and if desired, change the position of the field (by clicking, holding and dragging up) to the same position as in Survey123
-
Save changes in the ribbon at the top of the window
-
Open the Attribute Table, right click on the column header of the new_type field and choose Calculate Field
-
In the Calculate Field geoprocessing window, select the renamed old_type field as the new value
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Delete the renamed old_type field
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
Change of type - text to select_one
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Find the field and click in the domain cell
-
Choose Add New Coded Value Domain and enter your domain information
-
Save changes. If Save fails, use the GP tools Create Domain, Add Coded Value To Domain and Assign Domain To Field
-
Restart feature service(s) or the ArcGIS Server service
Change of field name
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Rename the Field Name
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
Change of label
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Change the field Alias
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
Change of bind::esri:fieldLength
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Change the field Length - Note that your new length must be longer than any existing data in the table, or longer than your previous length value.
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
Adding a new field
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Add a new field by clicking on the last line of the table
-
Enter the field name (name in Survey123), the alias (label in Survey123), Data Type (type in Survey123) and the Domain information if it is a select_one. See the Data Type Conversion Table for more information.
-
Change the position of the field (by dragging up) to the same position as in Survey123
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
Adding a new geopoint field
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Rename the standalone table (like !name!_old) and re-add it to the map
-
Create new repeat feature class
a. Right click on the database connection and select New, Feature Class
b. Choose Point as the Feature Class Type and use the same name as the previous table
c. Import fields from the standalone table (remove Global Id from list)
d. Choose the right Coordinate System (usually WGS 1984)
e. Finalize creation
f. Right click on the new feature class and Add Global Ids, Enable Archiving and Enable Editor Tracking
g. Add the feature class to the map and rename it in the map Layer List by removing the database and schema information, i.e. imsma.geo.my_table
-> my_table
-
Join the original standalone table (containing information without geographic information) to the feature class containing geographic information, in most cases it would be the main feature class of the Survey123 form with a join on uniquerowid/parentroxid.
-
Append information from the feature class with the join to the new empty feature class with the option Use the Field Map to reconcile schema differences (Editor tracking information is lost)
-
Remove the join
-
Delete and re-create relationship class to point to the new feature class
-
Remove standalone table from map
-
Restart feature service(s) or the ArcGIS Server service (need to be done before overwriting the service definition)
-
Change feature service definition by going to Share, Web Layer, Overwrite Web Layer
Adding a new repeat
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Following this procedure, create a new temporary Survey123 form, export the structure and copy the new repeat structure in the geodatabase (just the repeat table not the other tables, they already exists in the database).
-
Do not forget to create the new relationship class from parent record to your new table, enable archiving and create attachment tables if necessary
-
Add new feature class to the map used to create the feature service, at the bottom of the layer list.
-
Restart feature service(s) or the ArcGIS Server service (need to be done before overwriting the service definition)
-
Update feature service definition by going to Share, Web Layer, Overwrite Web Layer
-
Check all webmaps and webapps using the feature service
Modifying a choice list
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on a feature class of the geodatabase where the choice list must be modified and select Design then Domains
-
Find the domain in the list and select it
-
Do the modifications in the code list
-
Save changes (if Save fails, it is possible to use the Add Coded Value To Domain GP tool)
-
Restart feature service(s) or the ArcGIS Server service
Deleting a field from geodatabase
-
Ensure that all users have submitted data from their devices (no pending Outbox forms) then stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Right click on the feature class/table on which the field must be added and select Design then Fields
-
Delete the field by right clicking on the field and select Delete
-
Save changes
-
Restart feature service(s) or the ArcGIS Server service
-
Ensure that your Survey123 form also has the field deleted and users have updated to the new form version or users will be unable to submit data.
Deleting a related table from geodatabase
-
Stop all feature services using the impacted geodatabase table. In doubt, stop the ArcGIS Server service.
-
Open ArcGIS Pro and connect to the geodatabase (the easiest is to open the project that contains the map used to create the feature service)
-
Remove feature class from map
-
(Optional) Delete feature class from geodatabase (Right click, Delete from Database Connection). Another option is to rename the feature class and delete the relationship which retains the data in case there are any issues.
-
Restart feature service(s) or the ArcGIS Server service (need to be done before overwriting the service definition)
-
Change feature service definition by going to Share, Web Layer, Overwrite Web Layer
Data Type Conversion Table
Survey123 | ArcGIS Pro |
---|---|
text | Text |
integer | Long |
decimal | Double |
date | Date |
time | Date |
dateTime | Date |
select_one | Text |
select_one_external | Text |
select_multiple | Text |
esriFieldTypeDate | Date |
esriFieldTypeSingle | Float |
esriFIeldTypeDouble | Double |
esriFieldTypeInteger | Long |
esriFieldTypeSmallInteger | Short |
esriFIeldTypeString | Text |