HOW TO

Prevent NULL and empty string values in an attribute table in ArcGIS Pro

Last Published: January 29, 2026

Summary

In ArcGIS Pro, disabling a field’s Allow NULL property prevents storing null values in the database. However, this does not prevent the entry of empty strings ("") in text fields. Since the system treats NULL and empty strings as two distinct values, a field may appear blank in the attribute table despite containing data.

This article explains the workflow to enforce an attribute rule that ensures text fields are always populated with meaningful values.

Procedure

Create a constraint attribute rule in ArcGIS Pro

  1. Open the project in ArcGIS Pro.
  2. Add global IDs to the attribute table of the desired feature layer using the Add Global IDs tool.
  3. In the Contents pane, right-click the feature layer and click Data Design > Attribute Rules.
  4. In the Attribute Rules view, click Constraint, and then click Add Rule to create a new rule.
  5. In the details pane of the Attribute Rules view, click Expression The Expressions icon to open the Expression Builder dialog box.
  6. In the Expression Builder dialog box, for Expression, add the following Arcade expression in the expression box. Replace <Field_Name> with the target text field name.
if (IsEmpty($feature.<Field_Name>)) {
    return false;
}
return true;
The Arcade expression
Note:
The IsEmpty() function evaluate both null values and empty strings. Returning false prevents the record from being saved if the field is empty. Meanwhile, returning true allows saving when a valid value is present.
  1. Click ValidateOK.
  2. For Triggers, check the Insert and Update check boxes.
  3. For Error, specify a desired value in the Error Number box and enter a descriptive text for Error Message.
  4. On the Attribute Rules tab, in the Manage Edits group, click Save to save the attribute rules.

The error message below indicates NULL and empty string values are prevented in the attribute table.

The returned error message

Article ID: 000037890

Software:
  • ArcGIS Pro

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options