When collecting data through a web app to create a new feature in a hosted feature layer in ArcGIS Online, the newly digitized feature disappears from the map once it is deselected. Attempts to create a new feature fail and the web app returns the following error message:
Error: Values could not be submitted.
For example, the Citizen Science Reporter web app allows users to report sightings of plants and animals observed in wildlife areas from a mobile phone, tablet, and desktop computer. However, when a record is submitted, the error message is returned instead.
This issue occurs if the hosted feature layer contains a non-nullable field with no value specified, prompting an invalid applyEdits request to be sent to the service.
A Fiddler trace reveals the following response to the invalid applyEdits request:
Error: 'Cannot insert the value NULL into column 'column_name', table 'table_name'; column does not allow nulls. INSERT fails'.
Note: It is possible for a field to be non-nullable, with no default value specified, and hidden from display in an attribute table.
To resolve this issue, use one of the following solutions:
Populate the non-nullable fields with default values
As stated, if the non-nullable field is hidden in the attribute table, identify and ensure the affected fields are displayed. Once the hidden fields are displayed, identify which of the fields are non-nullable and populate these fields with default values.
Create a new nullable field
As the nullable property of an existing field cannot be edited by default, download a local copy instead. Create a new nullable field, delete the original dataset, and republish the layer.
Get help from ArcGIS experts
Download the Esri Support App