Display Name and Field Name of Related tables

1558
9
10-08-2021 08:42 AM
DEI
by
Occasional Contributor

Hello,

I downloaded a FGDB which includes a point layer and 6 related inspection tables from AGOL. In Pro added new names to an existing domain, deleted a field from the feature class that was supposed to be of Data Type Date but was incorrectly created as Text, recreated the field with Data Type Date, tried both overwriting and re-publishing to AGOL and each time the related table Display Names and Field Names show up blank in the Data tab. 

DEI_0-1633706899210.png

I cannot select anything below the Display and Field Names in order to edit the names. Layers show up fine in Field Maps and Field crews can add data but I cannot re-create Arcade expressions because FeatureSetByRelationshipName( ... ) is blank.

Does anyone know how to resolve this?

 

9 Replies
DEI
by
Occasional Contributor

Some additional info. I found that the forward and backward labels within the relationship class properties are blank in Pro. Not sure if this is part of the issue but this is what the dialog should look like according to online documentation:

DEI_0-1633962123945.png

And this is what mine looks like (no “Forward Path Label” or “Backward Path Label” option to edit):

DEI_1-1633962161756.png

 

0 Kudos
Strahanjen
Occasional Contributor II

Did you ever resolve this? I'm having the same issue and would love some advice on how to fix it.

0 Kudos
DEI
by
Occasional Contributor

Nothing yet.

However, because Display and Field Names remain blank, I've been able to work around the issue by using FeatureSetByRelationshipName($feature,""). Not ideal but it works in most of my cases.

0 Kudos
Strahanjen
Occasional Contributor II

Thanks, I determined that the only way to solve this issue is to delete the relationship classes in Pro and then create them again. After doing that, I overwrote the existing feature service in ArcGIS Online. 

0 Kudos
MJBiazar
Esri Contributor

Hi @DEI ,

When creating a relationship class, you can specify the Forward/Backward Path Label. These labels are carried over to the hosted feature layer. This label is what FeatureSetByRelationshipName( ... ) uses to reference a relationship in a feature service. 

If you export your feature layer as a file geodatabase from ArcGIS Online, the Forward/Backward Path Labels are dropped, so when the layer is published back to ArcGIS Online, the relationships in the hosted feature won't have the labels initially specified when the relationship class was created. 

2022-06-09_9-09-22.png

A defect (#BUG-000149669) has been logged against this behavior. In the meantime, it seems that in the meantime, the workaround is to recreate the relationship class in Pro and reassign the Forward/Backward Path Labels.

 

Best,

MJ

0 Kudos
mikAMD
by
Occasional Contributor II

I still have the problem.

I downloaded a GDB from AGOL, created a new GDB, used feature class to feature class tool to convert 3 features classes from the old to the new GDB, then created 2 new relationship classes, zipped the GDB, uploaded to AGOL and the display name online is the relationship class name.

Python commands (with "layer1", "layer2" and "layer3" being used as tests for display name and "RelTerrainsActifs" and "RelTerrainsPlaces" as relationship names):
arcpy.management.CreateRelationshipClass("terrains", "actifs", "RelTerrainsActifs", "SIMPLE", "layer2", "layer1", "NONE", "ONE_TO_MANY", "NONE", "terrain_no", "terrain_no")
arcpy.management.CreateRelationshipClass("terrains", "places", "RelTerrainsPlaces", "SIMPLE", "layer3", "layer1", "NONE", "ONE_TO_MANY", "NONE", "terrain_no", "terrain_no")
 
ArcGIS Pro result (in French but you can see the relation names "layer2" and "layer3":
mikAMD_2-1680540032101.png

 

Online result showing relationship names and not display name:

mikAMD_0-1680539842249.png

 

 

If instead I publish directly from ArcGIS Pro with "share as web layer", then I do get the display name, but the relationship name is also the display name (which I guess is ok?):

mikAMD_3-1680540624077.png

 

When publishing directly from ArcGIS Pro, a Service definition is also created on AGOL with the same name as the newly created hosted feature layer (while when zipping the GDB and uploading it manually, there is no service definition. Could this be the cause?

0 Kudos
AnthonyJonesRSK
Occasional Contributor II

Hi MJ, 

Just wondering if there is any progress on this bug? 

Thanks

Anthony 

elpinguino
Occasional Contributor III

Same here.

0 Kudos
BRENNEJM
New Contributor III

Just looked up that bug (#BUG-000149669) and the status is "Under Consideration". I don't know how this isn't a higher priority for Esri. The bug literally breaks the database on download and recreating the relationship classes isn't a viable workaround when I have 140 relationships in my GDB. My workflow involves periodic exporting of the FGDB, adding new feature classes or tables and new relationship classes, and then overwriting the existing hosted feature layer. I realize these new layers can be added using the REST API and "Add to Definition", but this workflow would be a much easier/safer option for us.