Filter Widget Issue: "apply this filter automatically" not working as intended.

475
6
Jump to solution
02-29-2024 02:05 PM
JoshBerna
New Contributor III

I'm having a peculiar issue in experience builder regarding the "apply this filter automatically" option for the filter widget.

I have a set of parking spots represented as points, in this are features I just added for a parking garage. I added an extra field to the layer attributes called "garagefloor" for the purpose of filtering between floors of this garage in experience builder. The spots in the garage are updated appropriately to indicate which floor they are on, as they obviously look all jumbled together on a 2D surface, and I'd like to only show one floor at a time.

My thought process was to add a filter for these points in experience builder, in which floor 1 was set to "apply this filter automatically," while the others (operator AND, so floor 1 would have to be toggled off in the widget to see floor 2) would be initially hidden. Unfortunately, though this filter indicates it is applied upon first opening the map, for some reason it does not automatically apply (or show, at least) until the filter widget is clicked on. I don't have to re-toggle the filter to on in the widget, I actually just have to click the widget when viewing the published item at which point the app updates and the filter is shown. No toggling of switches in necessary, which is the confusing part for me. 

Please, oh wise GIS professionals, enlighten me on the errors of my ways. I'm assuming this may be some sort of bug, but would be happy to learn that this is something I can fix myself. Thank you!

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Regular Contributor

Hi @JoshBerna 

As Jeffrey mentioned above, the reason is that the Filter widget is put inside the Widget Controller, and it does not render until you open the controller panel, thus why the "automatically applied" behavior won't occur until then.

 

There are two ways to solve that - one is to put the filter widget out of the controller; the other one is to use the "Open widgets on loading" setting in the Controller widget, to make sure the filter opens:

TonghuiMing_0-1709607577039.png

Thanks,

Tonghui

View solution in original post

6 Replies
TonghuiMing
Esri Regular Contributor

@JoshBerna It is a bit challenging trying to imagine the data structure and configuration via description only. Can you share the app with some screenshots or recordings to help illustrate the issue?

0 Kudos
JoshBerna
New Contributor III

@TonghuiMingI absolutely can, thank you for the quick response. Here's the experience builder link: https://experience.arcgis.com/experience/39ab9505a23a46c5b875d545879a6483/

...and I've attached a screen recording of the issue. You can see the filter is ticked, but it does not actually apply until I open the widget.

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Widgets in a Widget Controller do not run automatically when the application loads. They do not start until they are first opened. You will need to take the filter out of the Widget Controller. 

GIS Developer
City of Arlington, Texas
JoshBerna
New Contributor III

Thanks for taking the time Jeffrey, I did not know this.

0 Kudos
TonghuiMing
Esri Regular Contributor

Hi @JoshBerna 

As Jeffrey mentioned above, the reason is that the Filter widget is put inside the Widget Controller, and it does not render until you open the controller panel, thus why the "automatically applied" behavior won't occur until then.

 

There are two ways to solve that - one is to put the filter widget out of the controller; the other one is to use the "Open widgets on loading" setting in the Controller widget, to make sure the filter opens:

TonghuiMing_0-1709607577039.png

Thanks,

Tonghui

JoshBerna
New Contributor III

Thanks Tonghui, I evidently failed to notice this option in the widget controller. That's just what I'm looking for however, thank you for the assistance!