PROBLEM

The Filter query in an ArcGIS Online Map Viewer web map returns incorrect results

Last Published: October 20, 2021

Description

When using the Calculate Field tool in ArcGIS Pro, setting field values to an empty string returns incorrect results in ArcGIS Online Map Viewer.

The image below shows the cells do not display when filtered using the ‘is blank’ expression.

Cells do not appear when filtered

Cause

This is by design. If the field value is an empty string, ' ' or " ", it is not the same as a null value and is considered white space in ArcGIS Online. Due to this, the cells do not display when the field values are filtered in ArcGIS Online. Refer to BUG-000097404 for more information.

Solution or Workaround

Perform both the following workflows in order, first in ArcGIS Pro then in ArcGIS Online.

Use None instead of “ ” or ‘ ’

  1. In ArcGIS Pro, navigate to View > Geoprocessing.
Navigate to Geoprocessing
  1. In the Geoprocessing pane, search for the Calculate Field tool in the search box.
Search for Calculate Field tool
  1. In the Calculate Field pane, under Parameters, select the desired layer for Input Table and specify a name for Field Name.
Select desired layer and name
  1. For Expression Type, select Python 3.
  2. Under the = section, fill in None. Click Run.
Under = section, fill in None
  1. Publish the map to ArcGIS Online.

Apply the Filter query in ArcGIS Online Map Viewer

  1. Log in to ArcGIS Online.
  2. Navigate to Content and open the published map from the previous workflow.
  3. Expand the layer and select Show table.
Select show table
  1. Select Filter.
Select Filter
  1. In the Filter pane, under Expression, select the desired fields and for the second row, select is blank.

The image below shows the fields displayed correctly in ArcGIS Online Map Viewer.

Fields are displayed correctly in ArcGIS Online

Article ID: 000026533

Software:
  • ArcGIS Online
  • ArcGIS Pro 2 8 x

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