Are many-to-many relationships supported in AGOL or Portal

1102
4
10-21-2019 10:56 AM
KevinCapone__GISP
New Contributor

I cannot find any information regarding if many-to-many relationship classes are supported in ArcGIS Online or Portal. I have one-to-many relationships working fine, but I cannot get many-to-many to view related records.  Any help would be appreciated.

0 Kudos
4 Replies
LeoLiu1
Occasional Contributor

Hi Kevin,

I saw a document from Web App Builder states that Edit Widget works on many to many relationship classes, which means many to many relationship is supported.

Edit widget—Web AppBuilder for ArcGIS | Documentation 

Cheers,

Leo.

0 Kudos
AdamT_GDi
Esri Contributor

Looks like many-to-many is supported. Not sure exactly when this was implemented but got it working with a test example below:

AdamT_GDi_0-1677168341784.png

 

AdamT_GDi_1-1677168403181.png

 

 

LaurenWinklerCMU
New Contributor II

Are many-to-many relationships also supported in ArcGIS Online?

I am trying to add a new many-to-many relationship to a feature class that already has a one-to-many relationship. When I added the relationship and published it, the second relationship was not in ArcGIS Online and the original relationship's ID had changed from 0 to 1, breaking the Esri Leaflet function I have to find related records. https://developers.arcgis.com/esri-leaflet/api-reference/tasks/query-related/

I had to delete the many-to-many relationship to get my application to work properly again.

As an aside, the Create Relationship Class geoprocessing tool in ArcGIS Pro is really unreliable, I think because it is so slow. Dropdown values revert to previous values and incorrect error messages appear while setting parameters. It takes several minutes and several attempts to set the parameters.

0 Kudos
LaurenWinklerCMU
New Contributor II

Update: After much searching, I found how to publish a feature service with a many-to-many relationship to ArcGIS Online. You need to share the web layer from the Share ribbon instead of right clicking the layer from the Contents Pane.

The difference between these two methods of publishing was not clear. Someone submitted an idea to make this distinction clearer in the documentation or UI, but Esri decided not to make any changes.

https://community.esri.com/t5/arcgis-pro-ideas/publish-related-tables-in-arcgis-pro-documentation/id...

0 Kudos