Problem: Data represented by null values are not symbolized on the map in ArcGIS Online
When publishing from ArcMap to ArcGIS Online, data represented by null values are not symbolized on the map. To ensure the data are displayed, null values are symbolized differently on the map.
The attribute table in the image below shows the null values in the PICKPOCKET column before publishing to ArcGIS Online.
The image below is the published map showing the distribution of pickpocket incidents in Florida. Features with null values are not displayed on the map.
The problem occurs due to the null values in the dataset. Null values represent no data or no value, and are therefore not symbolized on the map.
Solution or Workaround
Choose one of the following methods to symbolize null values in a hosted feature layer in ArcGIS Online:
Configure from ArcGIS Online
- In ArcGIS Online Map Viewer, navigate to Details > Content.
- Click the Change Style button . The Change Style pane opens.
- Specify the attribute to show from the drop-down list.
- Click the Options button of the selected drawing style.
- Scroll to the Size section, and check the Draw features with no value check box.
- Click OK.
The image below shows the newly populated data. Null values are represented by the gray area, while coded values are represented by the chosen symbology.
Configure through ArcMap
- In ArcMap, replace null values with zero (0).
- Start an edit session.
- For numeric fields, populate null values with zero (0). Refer to How To: Replace null values with zero in an attribute table. For Text fields, populate null values with an empty string (" "). The null values are represented as 'Other' on the map.
Note: If there are zero values in the dataset, the other option is to represent null values with numbers out of the data range, such as -99 or -999. Refer to FAQ: How do you represent NULL values when converting from a geodatabase, or shapefile, to a coverage?
- Overwrite the existing service in ArcGIS Online by navigating to File > Share As > Service. Select the appropriate options in the Overwrite an Existing Service dialog box, and click Publish.
- In ArcGIS Online Map Viewer, symbolize the newly populated field through the Change Style pane.
The image below shows the newly populated data on the map. Null values are now represented by the value zero.
Note: In cases where the attribute table cannot be edited because the service is overwritten with null values, follow the steps below to update the attributes: 1. Navigate to the Settings tab of the items detail page. 2. In the Feature Layer (hosted) section, check the Enable Editing check box. 3. Scroll to the What kind of editing is allowed? field, and select the Update attributes only option. 4. Click Save. Choosing this option may require future Settings changes to enable other forms of editing the hosted feature layer.
- FAQ: Is it possible to assign nulls to a field using the Field Calculator?
- Esri Canada: 3 ways to make fields 'mandatory' in ArcMap