English
Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

FAQ: Is it possible to add relationships to a hosted feature service in ArcGIS Online?

Question

Is it possible to add relationships to a hosted feature service in ArcGIS Online?

Answer

Yes. It is possible to add relationships to a hosted feature service in ArcGIS Online. The REST API Administrative directory can add and delete relationship classes in a hosted feature service in ArcGIS Online if the related table and the feature layer exist within the same service. However, it is not recommended to edit the service through the REST endpoint because this can modify the schema of the hosted feature layer. The suggested workaround is to create a related table in ArcGIS Pro, and overwrite the hosted feature layer in ArcGIS Online.

  1. In ArcGIS Pro, add the existing hosted feature layer from ArcGIS Online. Refer to ArcGIS Pro: Add layers to a map or scene for instructions and more information.
  2. Export the feature layer to the same geodatabase where the related table is located using the Feature Class To Feature Class tool. Refer to ArcGIS Pro: Feature Class To Feature Class for instructions.
  3. Use the Create Relationship tool to create a related table for the hosted feature layer. Refer to ArcGIS Pro: Create Relationship Class for more instructions.
  4. Overwrite the hosted feature service from ArcGIS Pro to ArcGIS Online. Refer to ArcGIS Pro: Overwrite a web feature layer for instructions.

Related Information

Last Published: 8/7/2022

Article ID: 000025302

Software: ArcGIS Online Current ArcGIS Pro 2.7.7, 2.7.6, 2.7.5, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7, 2.4.3, 2.4.2, 2.4.1, 2.4, 2.3.3, 2.3.2, 2.3.1, 2.3, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2, 2.1.3, 2.1.2, 2.1.1, 2.1, 2.0.1, 2.0