Hello,
I've got a simple app with a filter widget with three different filters all looking at the same column of the same layer. One filter displays just records with the top 10% (column > a set value), the next displays the top 25%, and the last displays the top 50%.
When AND is selected in the Filter Widget's Content tab and I turn on more than one filter, it looks to the user like only the most restrictive filter is active. That is, if the "top 10%" and the "top 50%" filters are both turned on, then it looks like only the "top 10%" filter is turned on. Naturally, when OR is selected this behavior is reversed and the "top 50%" filter appears to be the only one working.
I understand how ANDs and ORs work and why this is happening but I am concerned that the end users will get confused when they have more than one filter turned on but only one will appear to them to be working.
Is it possible to set up this widget so that when you turn on one filter it automatically turns off the other filters? What I'm thinking of is like how "radio buttons" work; the filters will be mutually exclusive.
Alternatively, is there another widget that can act like a filter? I've looked through the available widgets and nothing is jumping out at me as a candidate. However, I am new to Experience Builder and I'd like to double check that I'm using this widget properly before I go and try to create a custom one.
I'm using v1.16 (developer version).
Thank you,
Mike
hahaha. I was tackling this just last Friday!
Short answer: "No".
Longer answer is that I found two ways to do this. Both are convoluted.
Method 1 (I opted for this option, for my latest project):
NOTE: I called my table "state" rather than "status" because I was rushing to try different things. But "State" is my uploaded table.
I actually really like this one. It will be a public website later this week as I am setting it up specifically for demo purposes. Unfortunately, you will need to wait a day or so for me to finish a few things. Here are screen caps though...
Method 2:
Sounds like a column for the Tips and Tricks Board...
Good idea. I'm sure even future me will forget what I did, so a guide is a smart idea!
I look up stuff from my own posts all the time.
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#definiti...
Since you are on Developer Edition, a Custom Widget that has radio buttons and adds different definitionExpressions to the layer will probably be your best option.