PROBLEM

Unable to append feature class data from ArcGIS Pro to an ArcGIS Online hosted feature layer

Last Published: March 15, 2021

Description

Data from a feature class created in ArcGIS Pro can be appended to an ArcGIS Online hosted feature layer using scripts and geoprocessing tools. In some instances, attempting to append the data to a hosted feature layer fails, and returns the error message: 

Error:   
Object reference not set to an instance of an object.

Cause

  • There are duplicate field values in the field used as the matching field to append the hosted feature layer.
  • The field values in the dataset exceeds the character limit of the matching field of the hosted feature layer.
  • The file geodatabase appended in ArcGIS Online is not recognized.

Solution or Workaround

Depending on the cause, use one of the methods provided to resolve the issue.

Identify and isolate the duplicates values in the input dataset

To find and isolate the duplicate field values in the dataset used to append to the hosted feature layer, refer to How To: Identify duplicate or unique values in ArcGIS Pro.

Increase the field length of the input dataset

Increase the number of allowable characters for the target field before appending data. Use the Alter Field tool to set the new maximum number of allowable characters for each field.

Note:
This option is only applicable to the TEXT or BLOB field type. If the table is empty, the field length can be increased or decreased. If the table is not empty, the length can only be increased from the current value.

Use the correct file extension for the file geodatabase

  1. Rename the file geodatabase, and add the .gdb extension.
  2. Compress the file geodatabase, and use the Append Data to Layer tool in ArcGIS Online to update the existing features in the hosted feature layer. Refer ArcGIS Online: Append data to layers for more information.

Article ID:000025195

Software:
  • ArcGIS Web AppBuilder
  • ArcGIS Online
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic