PROBLEM

Z-values do not display in pop-ups when using Arcade expression in ArcGIS Online Map Viewer

Last Published: September 24, 2021

Description

In some instances, when configuring pop-ups and adding custom expressions using the ArcGIS Arcade geometry function to display Z-values in ArcGIS Online Map Viewer or ArcGIS Online Map Viewer Classic pop-ups, a null value is returned.

The following image shows an example of a null value returned when using the Arcade expression in ArcGIS Online Map Viewer.

The example of a null value returned when using an Arcade expression in ArcGIS Online Map Viewer.

The following image shows an example of a null value returned when using the Arcade expression in ArcGIS Online Map Viewer Classic.

The example of a null value returned when using an Arcade expression in ArcGIS Online Map Viewer Classic.

Cause

  • Z-values are not enabled in the data.
  • A known limitation with Arcade expressions in ArcGIS Online Map Viewer Classic. This issue is logged by Esri as a defect. Refer to BUG-000119441 for more information.

Solution or Workaround

Use one of the methods below to resolve the issue.

Enable Z-values on the existing data in ArcGIS Pro

  1. In ArcGIS Pro, add the layer to a new project.
  2. Right-click the feature layer in the Contents pane, and click Data > Export Table.
  3. In the Export Table window, select the desired feature layer for Input Rows, and fill in the name for Output Name. Click OK.
  4. Right-click the newly exported table, and click Display XY Data.
Select the Display XY Data option to enable the Z-values.
  1. In the Display XY Data window, select the table for Input Table and the field for Z Field. Retain the default parameters for others if no changes are to be made.
  2. Click OK. A new feature layer is created with the z-values enabled.
Select the desired table and field in the Display XY Data window.
  1. In the Contents pane, right-click the new layer, and click Sharing > Share As Web Layer.
  2. In the Share As Web Layer pane, click General, and fill in the required fields. Click Publish.
  3. In ArcGIS Online Map Viewer, configure pop-ups of the Z-enabled hosted feature layer to display Z values using the ArcGIS Arcade geometry function.

Use ArcGIS Online Map Viewer instead of ArcGIS Online Map Viewer Classic

  1. Log in to the ArcGIS Online organizational account.
  2. Click Content, and click the My Content tab. Select the layer or web map to open in Map Viewer.
  3. In ArcGIS Online Map Viewer, on the Settings toolbar, click Configure pop-ups.
  4. In the pop-up configuration pane, click the drop-down arrow, and select the desired feature layer.
  5. Click Manage expressions > Add expression.
Select the Manage expression option to add the custom Arcade expression.
  1. In the Expression window, fill in the following expression:
Geometry($feature).z
  1. Click Test, and click OK.
  2. Set the custom expression as the displayed field in the pop-up. The image below shows the Z value is displayed in the pop-up using the custom expression.
The example of the Z-value being displayed in the pop-up.

Use the Add Z Information tool in ArcGIS Pro

Note:
The 3D Analyst extension is required for the tool and workflow described. Ensure the Z-values are set before proceeding the following workflow.
  1. In ArcGIS Pro, add the feature layer to a new project.
  2. On the top ribbon, click the Analysis tab > Tools.
  3. In the Geoprocessing pane, search for and select Add Z Information (3D Analyst).
  4. In the Add Z Information pane, click the Parameters tab.
  5. Select the layer for Input Features, and check the Spot Z check box for Output Property.
  6. Click Run. A new Z field is created.
Fill in the required details in the Add Z Information pane.
The example of a new Z field created from the tool.
  1. Publish the layer to ArcGIS Online, open it in Map Viewer, and configure the pop-ups of the layer to display the new Z field. Refer to ArcGIS Online: Configure pop-ups for more information.

Article ID: 000026460

Software:
  • ArcGIS Online
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 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