Filtering a many-to-many relationship

1374
5
08-25-2021 07:57 AM
MarceloRosensaft
New Contributor III

Hello,

Here is my situation:

- I have a point FC of LOCALITIES and a table of SAMPLES collected - many samples collected in each locality

- Every year there's a new expedition that goes to some of the localities and collects more samples so for every sample in the SAMPLES table, not only there's a field with the locality ID but also a field with the ID of the expedition - and separately a third table called EXPEDITIONS

This seems to be a standard many-to-many relationship.

I'd like to see the map of the LOCALITIES but filtered by the EXPEDITIONS.

I'm trying to use list and filter widgets but cannot find the right actions to use.

I'm using ExB developer edition 1.5 with ArcGIS enterprise 1.8.1

Thank you in advance,

Marcelo

5 Replies
EmmaHatcher
Occasional Contributor

Hi Marcelo,

I think you should be able to simply set up a message action on the EXPEDITION layer that's using a ExB list to filter your framework based on whatever foreign & key field is common across the tables (see pictured for an example of one of my list trigger configurations). Are you finding that this isn't returning expected results? It sounds like filters would not be totally effective, as they don't operate via common foreign & key field between layers like lists do.

EmmaHatcher_0-1630081723903.png

 

The other option that I have found much more seamless and intuitive for multiple relationships is Operations Dashboard. I really like the results that come from using the category selectors & using the action capabilities in charts or lists.

I use Ops Dashboards for a set up where we have a streams FC related to multiple survey instances (via a stream ID), which is in turn related to multiple fish count features per survey instance (via a survey instance ID). You can filter both the streams & fish counts records by selecting a survey instance in a category selector.

-Emma

MarceloRosensaft
New Contributor III

Thank you so much Emma!

Your suggestion should work and it actually works to select  an expedition, trigger a message and get the respective specimens selected. But my situation has a second step that should show the localities of the selected specimens and that message doesn't work. I mean that it doesn't work when the specimen selection is achieved via a message. If I unselect/select the specimens manually, the localities are filtered correctly.

It looks like a bug but who am I to say that?

Marcelo

EmmaHatcher
Occasional Contributor

Well you aren't alone at least, I have a whole list of looks-like-a-bug things in ExB that I've run into... Feeling like one would write a novella dedicated to just those buggie things at this point.

0 Kudos
SerjStol
New Contributor III

Hi, did you say this suggestion worked for you? I find this only works for One to Many relationships. If you have Many to Many, the foreign keys of original and destination feature class are stored in an intermediary table and ExB Action Triggers do not expose that table so there is no way to set the correct keys for the triggers to work. In the Web Map Viewer popups however, the related records do work for M:N relationships. 

Correct me if I am wrong but are M:N not supported in ExB widget action triggers?

0 Kudos
SveinungBertnesRåheim
New Contributor III

We have discussed  the same problems in this thread. According to Esri, it is not possible to start an action based on the result of another action. You have to interact manually to activate an action:
https://community.esri.com/t5/arcgis-experience-builder-questions/many-to-many-relationship-in-exper...

Is this how EB is supposed to behave, or is this a bug? I dont know.

0 Kudos