Hello!
I created a 1:M relationship class between a point layer (origin) and a table (destination). EDIT: In the same gdb I have a 1:M relationship class between a polygon layer (orgin) and the same table as above (destination). Both relationships are set up with the primary key as the GlobalID (in the point and polygon layer) and foreign key as a created GUID field Log_GUID. The gdb was created in ArcGIS Pro then published to AGOL as a hosted feature layer. The relationship works as expected in Pro, but after publishing to AGOL the primary key does not copy to the foreign key when creating a new related record.
To make it even weirder, when creating the record in the form, the primary key copies(!) but as soon as I submit the record the primary key disappears and leaves the field blank. See images below:
1. Relationship class setup in pro before publishing to AGOL:
2. Create new record in Map Viewer using forms:
3. Form populates with the correct primary key into the foreign key field
4. Data is created without any error but not related to origin layer. The primary key doesn't carry over to the foreign key.
Why is this happening? It seems like it's working fine until I actually submit the form.
Hi @Kklitt,
This does seem odd. We'll need more information in order to see what's going on. I recommend reaching out to tech support to get a ticket started so we can investigate.
In the mean time, if you can share a link to your map with me I'll take a look at it.
I found the answer here: Multiple Feature Classes to One Related Table - Esri Community
When multiple feature classes are related to one table in a gdb and the end goal is for it to work in the AGOL environment, multiple GUID fields need to be created for each relationship class.
For example, with the issue I laid out above, I had to create two separate GUID fields in my table for each feature class that's related:
Point feature class --> Table
Polygon feature class --> Table
@EmilyGeo Is this normal behavior? And if so, it'd be super helpful (and a huge time savor) to have this mentioned in the documentation. This was especially confusing since it worked as expected in ArcGIS Pro with one general foreign key (Log_GUID) and looked like it was going to work in AGOL (primary key copied in the form) but never actually did.