Filter based on relationship class?

6163
22
Jump to solution
12-22-2017 08:03 AM
JasonCarter
New Contributor III

Hello,

I have a feature class of point data and a CSV file containing analytical chemistry results to each point (Groundwater Wells). Both are stored in an ArcGIS Pro file geodatabase. There are multiple results, on different dates, associated with the same well (point) in the CSV file. I have created a relationship class between the feature and the CSV file that links the results to the Well. 

My question is - how can I filter the feature class points based on the analytical results? I'd like to filter by values greater than or less than a result, and then only show points that meet the criteria.

Also, is it possible to do this in ArcGIS online without hosting as a feature service? 

Thank you.

22 Replies
deleted-user-H23pxZFaj1tR
New Contributor III

Thanks, I have not decided on the presentation yet, but either WAB or Dashboard, probably.

I tried filtering the Reports table in the Web Map, which is queried using FeatureSetByName($map,...);  but that did not change the results returned, unfortunately.

So there is no way to pass a variable to the Arcade expression at runtime?

XanderBakker
Esri Esteemed Contributor

Hi David Treering , 

I'm afraid there is no way (unless you want to develop this app) to pass a variable to an Arcade expression. I could have used this several times in the past, but it is not possible (yet?). Would be a good thing to have. If you create an idea and I will definitely +1 it: ArcGIS Ideas  

0 Kudos
deleted-user-H23pxZFaj1tR
New Contributor III

Thank you! Here is the Idea.

XanderBakker
Esri Esteemed Contributor

Hi David Treering ,

Don't forget to up-vote your idea yourself too. That does not happen automatically...

0 Kudos
JasonCarter
New Contributor III

Thank you, that worked very well! I see now how the sub queries work now. 

How did you change the symbol on the selected feature? When I perform a definition query the results that don't match disappear. 

0 Kudos
XanderBakker
Esri Esteemed Contributor

Glad it worked for you! Can you mark the post with the correct answer and the correct answer? This way it will be easier for other users to find the answer when they have a similar problem.

I didn't change the symbology. I copied the layer, changed the symbology and applied the filter to visually show which locations match the query. When you apply a filter (definition query) it will not select features or change symbology, it will just show the matching features in the symbology defined for the layer. 

JasonCarter
New Contributor III

Great, thank you so much. I had a feeling that is what you did. Just wanted to double check to make sure I wasn't missing out on functionality! Cheers

0 Kudos
KennethBusby
Occasional Contributor

Is it possible to filter a feature based on an attribute in a related feature?

 I want to only see the animals that are related to complaints with a status of Open. 

I can not find anything that will allow you to create a filter using related features or tables. 

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi kbusby ,

I don't think this is supported (yet), but I do like this use case. What you could do in case you are working with static data, is to create a new field and use field calculation to extract the related values. After that you can filter the layer. The downside is, when your (related) data changes, the calculated values are not updated automatically. 

0 Kudos
deleted-user-H23pxZFaj1tR
New Contributor III

Setting filters on the related table within the web map does not help. Since this is the case, I'm having trouble understanding exactly what $feature and $layer are referencing. Can this be clarified beyond what the documentation says?

0 Kudos