Select to view content in your preferred language

How can I filter a map using the Filter Widget on a created data view?

1580
6
10-11-2023 11:14 AM
Labels (1)
RyanBohan
Frequent Contributor

My goal is to have a user selected drop down, filter the points on map.

It appears the only way to filter a map is to apply the filter to the default data view.  

  • Map changes based on the filter.

RyanBohan_0-1697044133978.png

Filters have the option to select data views, only I cannot find a way to get the map to update.

  • Hoping I'm missing something in how the filter is applied.

RyanBohan_2-1697045883592.png

With the List widget there is an action to Filter the Map, however I have been unable to find this action on a Filter Widget

  • Is there a way to apply a Filter to a map in the similar way as a list?

RyanBohan_4-1697047284136.png   RyanBohan_3-1697046055856.png

Does this mean that in order to visually show the results on the map, the filter widget can only be applied to default Data view?

  • Which means any created child Data views, would also have the same filter applied to them.  
  • Hoping this does not mean I need to create copies of the map, in order to visually see the Filter selections on a map.
    • This would likely result in 4-6 identical maps, which increases any map changes by 6x.
6 Replies
TonghuiMing
Esri Regular Contributor

@RyanBohan 

This is the designed behavior of data sources and data views. See details here - https://doc.arcgis.com/en/experience-builder/latest/build-apps/select-data.htm#ESRI_SECTION1_63589EF...

TonghuiMing_0-1698393616306.png

 

Thus,

- Filtering behavior is at the data source level, so the filter on each data view will not affect the original DS

- The original DS filtering will apply to all views created from it

- Map is using map view, which you can see as equivalent to the original DS

 

So, it doesn't matter how many views are created, if the filter-map interaction is expected, connecting the filter with the default data source would do. It will affect other widgets using child data views as well.

0 Kudos
RobertAnderson3
MVP Regular Contributor

Is there a way to use a data view in a Map Widget that is not the 'Default' view, I'm trying to use the same map on multiple pages but filter it differently. If I change pages, because it ties to the 'Default' view, I then have 2 filters applied that result in no results being shown. One page is showing 2023 projects, the next 2024. I appreciate that data views can be used for a lot of widgets, they are very useful, but them not being able to be reflected in a map widget, the centerpiece of data, is a bit of a miss.

As Ryan mentioned, the way it currently works seems to encourage creating multiple copies of the map, which is a nuisance for maintenance.

RyanBohan
Frequent Contributor

That is exactly what I ended up doing, I think I have 6 identical maps.  As a work around for the Filter applying to all views.  I have been trying to update symbology and pop-ups on the layer itself, to avoid having to make the same change on 6 maps

RobertAnderson3
MVP Regular Contributor

It's a pain but it works I suppose. Being able to update the symbology on the layer itself is definitely a good strategy.

The other issue I was finding is that if I have more than one widget linking to a map to filter data (e.g. when a selection changes on a List widget and/or a Feature Info widget, the filter ends up showing nothing, or only prioritizing the one.

Or if I use an action to link the Feature Info widget to change the selection on the List, it doesn't then trigger the action on the list to change the filter. If my thinking for process makes sense haha

0 Kudos
DionysiosKerasidis1
Emerging Contributor

The way i have bypassed this limitation (i know ESRI have done too little with this widget). is to build a table widget with a filter option on it. The trigger an action to filter the map. its working fine.

 

0 Kudos
JoshBerna
Regular Contributor

Mid design honestly. I'm working with data that was a complete mess. I instituted a domain, but prior values still exist outside the domain. I was hoping to make a data view for the filter, so the list of unique values would reflect the domain rather than all those that exist within the data, as they will eventually be corrected.  Looks like I'll have to type out 100+ "predefined" unique values for each filter. There should be a capacity to select from a list of unique values rather than type them all out, such as with specifying fields in a data table.

Either way, there should be a means of implementing filters that does not require the default data view.

0 Kudos