PROBLEM

Unable to replace blank fields using Find and Replace in ArcGIS Pro

Last Published: April 1, 2024

Description

When attempting to replace blank fields with new values using the Find and Replace tool, no results are returned, and no replacements are made.

The Find and Replace control returns no results and makes no replacements

Cause

There is a space in the fields. One or more spaces in a field is considered a value. Therefore, the Find and Replace tool is unable to replace the fields with new values.

The image below of the ReliefStatus attribute table displays spaces in a field, also called ReliefStatus, by the cursor location when individual cells are selected.

The single spaces in the fields

Solution or Workaround

Use either of the following options to resolve the issue.

Remove spaces using the Calculate Field tool

  1. In the ArcGIS Pro Content pane, right-click the feature layer and select Attribute Table to open the layer's attribute table.
  2. In the attribute table, right-click the field and click Calculate Field. A field named 'ReliefStatus' is used in this example.
  3. In the Calculate Field window, configure the parameters.
    1. For Input Table, ensure the layer selected in Step 1 is prefilled. The input table is ReliefStatus.
    2. For Field Name (Existing or New), ensure the selected field name is prefilled. Otherwise, select the ReliefStatus field from the drop-down menu. 
    3. For Expression Type, select Python.
    4. For Expression, in the expression box, type the code provided below. Replace 'Field name' with the name of the field with single spaces to be removed. In this example, the single space in the ReliefStatus field is removed.
!Field name!.replace(" ","")
    1. Click OK.
The Calculate Field tool with the parameters configured and the OK button
Note: 
The Calculate Field tool permanently modifies inputs by changing values in the fields. To avoid undesired data changes, turn on the Enable Undo option in the Calculate Field window before running the tool.

The image of the attribute table below shows that spaces are removed from the field.

The singe space is removed

Use the Find and Replace tool

Alternatively, insert a single space in the Find box and the intended new value in the Replace box using the Find and Replace control. Refer to ArcGIS Pro: Replace values in a table cell for more information.

Article ID: 000032189

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 3 2

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

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options