Problem: Unable to save the edits in the Smart Editor widget when some fields are empty
In some instances, when using the Smart Editor widget to edit the attributes of features in the Web AppBuilder for ArcGIS application, the Save button is disabled and the following message is returned when clicking on the empty fields:
Warning: This value is required.
This is by design. When clicking on the empty fields, the warning message is returned because these fields are not nullable. This can be verified by viewing the hosted feature service from the REST endpoint in ArcGIS Online. The following image shows the non-nullable fields when viewing from the REST endpoint:
BuildingType(..., nullable: false, ...) LvlDmg(..., nullable: false,...)
Solution or Workaround
To resolve this issue, change the field property to allow null values for the fields in ArcMap, and republish the hosted feature layer before adding it to the Web AppBuilder for ArcGIS application.
- In ArcMap, open the Catalog window.
- Right-click the feature class, and click Properties.
- In the Feature Class Properties dialog box, click the Fields tab, and click the field name to edit the field properties.
- In the Field Properties section, click the drop-down arrow for the Allow NULL values property, and select Yes.
- Click Apply > OK.
- Publish the feature class by choosing Overwrite an existing service in the Share as Service pane to overwrite the existing hosted feature layer in ArcGIS Online.
- Update the web map with the hosted feature layer and add the web map to Web AppBuilder for ArcGIS.
- ArcMap Help: Modifying Field Properties
- ArcMap Help: Copying feature datasets, classes, and tables to another geodatabase
- ArcGIS Online Help: Publish hosted feature layers
- Web AppBuilder for ArcGIS Help: Smart Editor Widget