English

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

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

Related Information

Last Published: 10/20/2021

Article ID: 000026533

Software: ArcGIS Pro 2.8.3, 2.8.2, 2.8.1, 2.8 ArcGIS Online 9.3, 9.2, 9.1