Select to view content in your preferred language

Filter Tool in List Widget

1575
4
Jump to solution
03-29-2022 02:27 PM
KateRose
Occasional Contributor

Hello!

I have a simple EB with a full-screen map displaying points from a single feature layer. I have a list widget that zooms to the point for the selected list item. Since my list has 40+ items, I'm trying to set up the embedded filter tool option in the list widget so that users can select certain feature attributes/combination of attributes and the list only displays the items that meet that criteria.

I was able to do this very easily with the stand-alone filter widget, and it worked perfectly, but I'd like to present an option where people can apply the filter query directly from the list widget.  

When I go to set the filters in the list widget's SQL expression builder, it seems like I only get to build one single query that has to include a value for each attribute with no option to just not include attributes in the query. The documentation for the list widget just directs me to the documentation for the filter widget, which is a very different experience, and I haven't been able to find any other resources for this.

thx

Kate

 

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Regular Contributor

Hi Kate, thanks for the clarification, and you are using them correctly.

For the Filter widget, the user could add multiple filters, but you can only add one in the List widget - that's the current design. Maybe we could evaluate and discuss if we can enhance it later. If you feel necessary, you could post on the Ideas page or Tech Support to log an ENH issue as well.

 

However, there could be a workaround if you dig this user interface. You can utilize the Filter widget as you configured above, change the Arrangement style to "Icon", and then put it onto the right corner of the List widget. In that way (with some style tweaks), as long as they are using the same layer, the behavior will look quite alike - hope it could help:

TonghuiMing_0-1648719398398.png

 

View solution in original post

4 Replies
TonghuiMing
Esri Regular Contributor

@KateRose The SQL Expression Builder inside the List widget provides the full functionality same as the Filter widget, such as the Ask-for-values option, and that's why the doc is linked to the ones in W-Filter. Are you referring to the function that W-Filter can add multiple filter items but W-List can add only one? I have a hard time understanding this - "I only get to build one single query that has to include a value for each attribute with no option to just not include attributes in the query". What do you mean by just including attributes in the query?

TonghuiMing_2-1648607605819.png

 

0 Kudos
KateRose
Occasional Contributor

Hi Tonghui-

Apologies for my admittedly poor explanation of the issue I'm having! I'll try again 🙂

My feature layer has 40+ features and several fields. Each field only has one attribute value, but the features have different combinations of attributes and null values.

KateRose_0-1648662117573.png


With the W-Filter I can create a filter linked to the W-List that uses the simple SQL clause for each field so that if a feature has that attribute, it will be selected. The attribute source type is "unique". There's no user input, but users are still able to select which attributes to filter for in the W-Filter bar.

KateRose_1-1648662117894.png


I selected the AND option for the filters so that the features can be filtered by one or more attributes

KateRose_2-1648662117866.png

KateRose_3-1648662117891.png

-----------------------------------------------------------------------------------------------------------------------------------------------------

I can not figure out how to replicate this in the W-List. I'm following the same SQL query/filter setup:

KateRose_4-1648662117612.png

but that gives me a single filter for every SQL query

KateRose_5-1648662117638.png

I've tried other filter configurations that require user input, hoping that it would then force selection options, but it ends up being a very non-intuitive process for the user.

For example, this configuration

KateRose_6-1648662117615.png

give me this, which is asking the user to select between the value and All (which is the same thing). It does filter the list correctly but doesn't allow selection of a single or multiple values. 

KateRose_7-1648662117643.png

I don't want users to have to fill in fields, as in your example above. I'd like them to just look at a list of attributes/values and select which ones to filter for. Maybe I'm not using the SQL expressions correctly?

thx

Kate

TonghuiMing
Esri Regular Contributor

Hi Kate, thanks for the clarification, and you are using them correctly.

For the Filter widget, the user could add multiple filters, but you can only add one in the List widget - that's the current design. Maybe we could evaluate and discuss if we can enhance it later. If you feel necessary, you could post on the Ideas page or Tech Support to log an ENH issue as well.

 

However, there could be a workaround if you dig this user interface. You can utilize the Filter widget as you configured above, change the Arrangement style to "Icon", and then put it onto the right corner of the List widget. In that way (with some style tweaks), as long as they are using the same layer, the behavior will look quite alike - hope it could help:

TonghuiMing_0-1648719398398.png

 

KateRose
Occasional Contributor

Ok, thanks for the answer. I'd considered changing the styling of the Filter widget earlier- I'd wanted to have a design option that would make it less prominent so I'd have space for other widgets- but then I discovered the List widget filter tool, and thought that would be better.

I like your style example, and may just use that 🙂    

I'll add this W-List filter improvement suggestion to Ideas as well.

Thank you!