PROBLEM

Unable to create new features using the Smart Editor widget in ArcGIS Web AppBuilder

Last Published: December 9, 2021

Description

In ArcGIS Web AppBuilder, attempts to create a new feature using the Smart Editor widget fail, and return the message, 'Your account does not have permission to create or modify data, or this web map does not contain any editable layers'.

The permission issue message displayed when attempting to use the Smart Editor widget.

If a new feature is drawn, attempting to save the feature returns the following error message. In some cases, the field mentioned in the error message is not displayed in the Smart Editor pop-up.

Error:   
Error: Cannot insert the value NULL into column '<field name>', table '<table name>'; column does not allow nulls. INSERT fails. The statement has been terminated.
The error message returned when attempting to save a new feature.

Cause

  • Editing is disabled for the hosted feature layer
  • Non-nullable or required fieldsĀ are not filled when saving the new feature. In some cases, the non-nullable or required field is hidden.

Solution or Workaround

Depending on the cause, choose one of the solutions below.

Enable editing for the hosted feature layer

Enable editing for the hosted feature layer on the item details page. Refer to Problem: Unable to create or edit features using the Edit widget in ArcGIS Web AppBuilder for more information.

Set a default value for the non-nullable or required field

Modify the feature template of the feature layer to set a default value for the non-nullable or required field.

Note:
This workflow is only supported in Map Viewer Classic. Only the owner of the feature layer or the organization administrators are allowed to modify the feature template.
  1. On the ArcGIS Online My Content tab, navigate to the web map used for ArcGIS Web AppBuilder. Click the ellipsis icon, and select Open in Map Viewer Classic.
  2. Click Edit, and click Manage.
  3. In the Layer drop-down list, click the name of the layer containing the feature template to modify.
  4. Click the small arrow to the right of the template name, and click Properties.
  5. In the Properties window, specify a default value for the non-nullable or required field. These fields are labeled with a red asterisk symbol.
Set default value for the non-nullable or required field.
  1. Click DONE, and click SAVE CHANGES.

The image below demonstrates the non-nullable or required fields populated with the specified default values when a new feature is created using the Smart Editor widget.

The non-nullable or required fields are populated with the specified default values.

Unhide and enable editing for the non-nullable or required field

In ArcGIS Web AppBuilder, unhide and enable editing for the non-nullable or required field in the Smart Editor widget configuration window.

  1. On the ArcGIS Online My Content tab, navigate to the web map application, click the ellipsis icon, and click Edit Application to launch the editing page of ArcGIS Web AppBuilder.
  2. On the Widget tab, hover over the Smart Editor widget, and click Configure this widget (the pencil icon).
  3. Under Layer Settings, click Actions (the pencil icon) for the feature layer to configure the fields settings.
  4. In the Configure fields for <layer name> window, check the Display and Editable check boxes for the non-nullable or required field.
The Display and Editable check boxes for the non-nullable or required fields are checked to enable editing.
  1. Click OK, and click OK again to save the configurations.
  2. Click Save, and click Launch. The pop-up of the Smart Editor widget displays all the non-nullable and required fields when creating a new feature.

Article ID: 000026903

Software:
  • ArcGIS Web AppBuilder
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options