Select to view content in your preferred language

Overwrite hosted feature layer and keep related table

429
2
11-05-2023 01:03 PM
Labels (3)
IB3
by
Occasional Contributor

Hi, 

I am trying to overwrite a hosted feature layer that is related to a table. I am just adding one new layer to the feature layer. When I overwrite the FL, I get a warning that the relations will be lost, but I can't seem to find a way to reintegrate them. 

I tried using the geoprocessing "Create a relationship", but the relationship was not published after overwriting. 

Does someone know hoe this can be done?

Thanks!

Isabelle

2 Replies
jcarlson
MVP Esteemed Contributor

Unfortunately, overwriting a feature service is the "nuclear option" for updating a hosted layer, and existing things will be completely dropped unless they are recreated in Pro prior to overwriting.

"Create relationship" only includes an in-memory relationship. If you want a real relationship to exist between the layers after publishing, you need the layers to be in a geodatabase, and you need to create a Relationship Class. Ideally, do this based on the parent's GlobalID and corresponding GUID fields in the child layers.

- Josh Carlson
Kendall County GIS
0 Kudos
IB3
by
Occasional Contributor

Ok, so I need to copy all the layers in a gdb and recreate the relations from the beginning. That seems like a lot of work. 

 

Is there maybe a non-nuclear option for updating the hosted layer?:)

 

 

0 Kudos