ERROR
When running an Arcade expression in a Map Viewer pop-up, the following error is returned:
Error: Test execution error: Execution error - Cannot access property of null object. Verify test data.
The layers are empty and do not contain any features. The function cannot be executed on an empty dataset. When a layer contains no feature, the attributes are considered missing because there are no values, not even null values.
Add features to the affected layer. Refer to Portal for ArcGIS: Add features or ArcGIS Online: Add features for instructions. The error message can also be addressed by running an in statement within the script to isolate empty attributes. The following is a sample script:
If (IsEmpty(first(fs)) == false){ Return firstFeature[“Shape_Length”]; } else{ return “No value found”; }
Article ID: 000034988
Get help from ArcGIS experts
Download the Esri Support App