Problem: The Filter query in an ArcGIS Online Map Viewer web map returns incorrect results
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.
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 ‘ ’
- In ArcGIS Pro, navigate to View > Geoprocessing.
- In the Geoprocessing pane, search for the Calculate Field tool in the search box.
- In the Calculate Field pane, under Parameters, select the desired layer for Input Table and specify a name for Field Name.
- For Expression Type, select Python 3.
- Under the = section, fill in None. Click Run.
- Publish the map to ArcGIS Online.
Apply the Filter query in ArcGIS Online Map Viewer
- Log in to ArcGIS Online.
- Navigate to Content and open the published map from the previous workflow.
- Expand the layer and select Show table.
- Select Filter.
- 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.
- ArcGIS Pro: Calculate null values
- ArcGIS Pro: Filter features with definition queries
- ArcGIS Pro: Find a geoprocessing tool
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