Two different filters working together on a map

754
4
Jump to solution
10-13-2023 12:54 PM
TimLohnes1
New Contributor III

Hi,

I have been through every scenario and every product in ESRI (portal/agol, WAB/XB/Instant) and haven't figured this out yet. I thought Experience Builder would be the solution and it doesn't quite seem to be.

I'm trying to create a scenario with two different sets of filters. For example, I have days of the week and I would like the user to specify as many as they want. So I pick Monday, Tuesday, and Wednesday as 3 separate filters (in XB, under 1 filter widget). These would be an OR filter as I want all sites that are available on Mon, Tues, or Wed to show.

Then I want another filter to apply to that and be AND. So pick all the days of the week you want then add additional other filters on top. So show me sites for (Mon, Tues, OR Wed) AND that are child-friendly and have drive-thru service. Instant app sidebar template doesn't work as everything is AND or everything is OR. Even the example from the ESRI blog shows a similar LA map that has faulty filtering where the days of the week and extra features are all OR giving misleading info (https://www.esri.com/arcgis-blog/products/instant-apps/mapping/whats-new-in-instant-apps-september-2...)

I now have an Experience Builder app with two Filter Widgets and at first I thought they were working, but when I select multiple days, I feel like it switches to OR between the two widgets. If I click Senior and Monday Afternoon (from 2 different filter widgets), it shows correctly only Monday Afternoon sites with Senior service. If I add Monday Morning, it no longer works correctly. It shows all Monday AM, all Monday Afternoon, and all Senior. Not the desired result. See screenshot attachments.

Any thoughts? Please see attachments. Maybe I should move on to Query Widget? Or custom app? 

 

Thanks,

Tim

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

Your logic appears to be sound and I have a working example of an app using two filter widgets in this way.

https://gis2.arlingtontx.gov/parkfinder/

The upper filter widget uses an OR connected and the lower filter widget has an AND connecter.

JeffreyThompson2_0-1697228294684.png

This app has been thoroughly tested and works as expected. I can't really explain your problem, but what you are trying to do should work.

GIS Developer
City of Arlington, Texas

View solution in original post

4 Replies
JeffreyThompson2
MVP Regular Contributor

Your logic appears to be sound and I have a working example of an app using two filter widgets in this way.

https://gis2.arlingtontx.gov/parkfinder/

The upper filter widget uses an OR connected and the lower filter widget has an AND connecter.

JeffreyThompson2_0-1697228294684.png

This app has been thoroughly tested and works as expected. I can't really explain your problem, but what you are trying to do should work.

GIS Developer
City of Arlington, Texas
TimLohnes1
New Contributor III

That looks great. Thanks for responding.

I have a bunch of questions

  • how did you style it like that? I get no options for selected filter button style or space between buttons. Yours looks very composed and user-friendly
  • were both of these filters on the same layer?
  • What type of expression for the areas? Amenities?
  • Is there any connection between the two Filter Widgets or you just dropped them on and set them up?
  • Is this built on enterprise or experience.arcgis.com or custom developed? I think I should try on experience.arcgis.com see if they have different results there.

I don't know if any of those questions matter, just trying to look under every rock.

See attached for my setup on Time filter.

0 Kudos
JeffreyThompson2
MVP Regular Contributor
  • Built with Developer Edition using the Button Activation Style with some additional css to change the color and make the buttons closer together. (Not options in the builder mode.)
  • Filters are operating on the same feature layer. (Probably the most important factor to making this method work.)
  • Expressions for each individual filter are pretty simple like GOLF IS NOT BLANK.
  • Each filter set has a Data Option that Zooms the map, but I don't think that is relevant to your problem.
GIS Developer
City of Arlington, Texas
0 Kudos
TimLohnes1
New Contributor III

Ok. Good to know about Developer. Thanks for your help.

Exact same setup works perfect in experience.arcgis.com. Must be some bug in Filter Widget in portal version.

0 Kudos