Select to view content in your preferred language

Does Experience Builder Action Triggers support Many to Many relationships

918
3
09-19-2023 10:26 AM
SerjStol
New Contributor III

Hey,

I have done some digging but no conclusive results. I am trying to display related records when a feature is being selected, either filter or highlight or select is fine. I have tried using Map Widget Action Triggers and List Widget Action triggers as I have read from other posts.

The relationship is Many to Many which has an intermediary table that was created in ArcGIS Pro and published to ArcGIS Online. Now in the Web Map Viewer, related records work and I can see related records when clicking on either feature from layer 1 or feature from layer 2, as they are in M:N relationship. But this functionality is limited, I cannot highlight or display these related records only navigate to them via the popup.

I wanted to be able to either set an Action Trigger in the Map Widget when feature 1 is selected all the related records are highlighted/selected or filtered. None of this works. The Origin and Foreign Keys of the intermediary table are not available to select and only the origin keys of both feature classes are available and they do not work:

Map Widget Action Trigger configured as below and also I tried with the List Widget, same no result. If I remove the toggle for the trigger/action connection then obviously everything is selected once the feature 1 is selected. So seems like Many to Many is not supported? I tried adding the intermediary relationship table to the web map but just got an error.

SerjStol_0-1695144162365.png

Many thanks if anyone can confirm if this functionality is in ExB?

Regards,

Serj

 

3 Replies
DanJiang
Esri Contributor

Hi @SerjStol , 

The trigger action connection does not work with the intermediary table. It works when the trigger layer and action layer have a direct connect key. And the connection supports m:n connection. For example, in your case, if the ids of the selected features in the "Bathing sites"  are [1, 2, 3, 4], the features from "Outfalls" with the same value for "AssociateAreaID" field will be selected. Please make sure the value for both fields are exactly the same (same type, same value). Could you confirm if this work? Otherwise I may need a sample data for further investigation. 

 

Thanks, 

Dan

0 Kudos
SerjStol
New Contributor III

In the m:n relationship you can't have ids of features only in the feature layers as you would have duplicated rows to support these relationships. I can only have One to Many relationship going on or the other way. Yes I suppose this would work in experience builder as I have tried before but for M:N you require some intermediary table to facilitate the relationships without having duplicates.

As far as I understand these values are kept within the relationship class itself when you create it from using intermediary table in ArcGIS Pro or ArcMap. Are you saying this M:N relationship class is supported in Experience Builder and if I set the Origin Keys correctly in the Origin and Destination tables I should have it working?

I had no luck. It doesnt select related records when I set the Action Trigger with the correct keys. When I set trigger to Filter the records on selection, ALL the features from the related layer disappear. 

0 Kudos
DanJiang
Esri Contributor

I see what you mean. You are correct. The connection is not passed by the intermediary table in ExB, as the message action will only apply to the direct trigger and target, to avoid loop in ExB. The one workaround I can think of currently, is that you can try use the trigger data to filter the intermediary table, display the table in a table or list widget, configure a selection change message on the intermediary table/list to filter the target data. Then, you need to manually select the left records in the intermediary table/list. The selection must be made manually to trigger the action. 

0 Kudos