Filter Widget like the availabile functionality in AGOL

06-23-2015 10:03 AM
New Contributor III

Does anyone know if Esri has this on their roadmap? We have to provide our users with the ability to filter multiple layers based on multiple attributes and their values. Query tool is nice but we have to be able to only show features based on the query or filter. I basically want the exact behavior in AGOL where a user can click on a layer and set a filter.

Just curious on if this is scheduled before I spend a ton of time trying to get this working.

Tags (1)
19 Replies
by Anonymous User
Not applicable

Hunter thank you for the fast and detailed reply.  However that widget nor the Query do this. Query widget is just a pared down version of Robert's eSearch.

In fact, if ESRI creates a 'Select' tool, as it was called in Flex, it might make sense to rename the existing Query widget to "Search" and then this widget could be called Query or Query Builder. Because that's what the examples in my previous linked sites do. They allow the user to create their OWN query.  Using SQL syntax.  I have a few dozen layers in a service.  Each layer has a dozen or so attributes, some have twice that.  And on top of that, users want to be able to do all the operators. Less than, more than, equal, or Like if it is text, etc. Hence users must be able to build their own queries and be able to choose which layer and field to query, and even string conditions together with logical operators.  What are your thoughts?

New Contributor III

You're correct - the current Query widget does support multiple layers and fields, but the configuration does not allow the end user to actually type their own SQL query. You would have to go through and manually define queries for each layer and field, which is obviously undesirable to say the least.

As far as I know a widget like you're describing is not on the Web App Builder roadmap, however, Robert Scheitlin has developed an "Enhanced Search Widget" that may meet some of your criteria, or at least give you a place to start.

by Anonymous User
Not applicable

Hunter, exactly, that approach works perfectly for a map service with a small set of layers with a small number of queries. In fact, I had started setting this kind of system up with Robert's eSearch, to basically clone this functionality into the eSearch widget. And it works quite nicely. It would also work with ESRI's Query widget.

However, for the site I am working on, we have 30 layers in the map service, each with about 20 attributes, and users would want to be able to all the operators for every field in every layer: greater/less than, equal, and 'like' for text strings. In other words, tens of thousands of possible queries. And it would also be useful to have logical operators to string queries together, such as parcels greater than 1 acre AND real estate value less than 100,000 dollars.  And also the spatial element, allowing to search Within, Outside, Intersecting... etc. In other words, replicating the ArcMap Select by Attributes and Select by Location. Both of my linked examples do this. Now I just need to port it into WAB.  For me... well, that will not be a small task. But if I must, I will do it.  I just want to inquire first if that is on ESRI's task list for a new widget to add to the next release of WebApp Builder? Do you know Hunter if ESRI has any plans to add such a feature into WAB?

MVP Esteemed Contributor


   This sort of inquiry would best be made to the esri WAB developer team Junshan Liu​ or current team management Derek Law

New Contributor III

Robert is correct - Junshan and Derek should know, but I highly suspect that this will not be included anytime soon. With how new Web App Builder still is, our development teams are getting a very high volume of requests. I would encourage you to go to and submit an enhancement request for this if you are not able to develop it yourself.

0 Kudos
Occasional Contributor II

Hi Hunter,

Have you heard anything regarding the filter widget and a release date? Thank you!

0 Kudos
by Anonymous User
Not applicable

I am releasing my Enhanced Query widget.  Thanks and credit also go to Robert Scheitlin who gave advice and contributed substantially. Now, he strongly recommended adding ability to consume multiple services for a 1.0 release.  But I am seeing a growing number of requests for this widget, and I have many other projects at work so the completion of this widget may take a while. Thus am releasing this as an alpha version.  I am open to any collaboration, pull requests, code contributions or advice. Feel free to use or modify the widget in any way or let me know of bugs.

Here it is. Enhanced Query 1.0 Alpha 1. Rebecca Strauch, GISP

It fully works, though with one service at a time. This is a 'alpha' release. I am working on adding multiple services and implementing Robert's UI suggestions. To use, create the query, click Add to Query, then 'Search'.

GitHub: EnhancedQuery/eQuery/widgets/Enhanced Query at master · kevinsagis/EnhancedQuery · GitHub


(The first widget on the left is the "Enhanced Query" widget.  My Pictometry widget is also in here.)


EnhancedQuery/readme.html at master · kevinsagis/EnhancedQuery · GitHub

MVP Esteemed Contributor

Thanks Kevin MacLeod !     It's been added to the resource list. 

0 Kudos
Occasional Contributor

Hi Kevin,

Widget seems to work fine for me, here is a couple of enhancements that I think would be beneficial.

1. Option to choose layers within a service which can be queried. At the minute I have quite a few layers in the one service, it would suit my final users to have a select amount of layers to choose.

2. Selected data from query appears in a results window in side the widget with an option to export as CSV


by Anonymous User
Not applicable

Hi Finbar Gillen​,

I think both of what you're looking for is possible:

1. It forwards results into the Attribute Table widget, and from there you can export to .csv. 

Yes, perhaps a result tab like Robert's widget would be good to add as well, as it would allow more customization, chiefly among that being able to exclude certain fields so one can scroll down through the results quickly since the programmer can elect to show only one or two fields for a given layer. This may be a future update. The priority at first though was shooting results to the Attrib Widget since it can then leverage the other built-in ESRI features such as .csv etc.

2. You can exclude layers, it's a breeze to set up. Check the Read Me.  Also you will see my example in the code, and it is commented and documented in the code and in the Read Me. Basically, you exclude layers by layerID in the Switch in the code. I was going to use an array to pass into an exclusion logic block but for some reason was having an issue, I can't even remember. I am going to make this more elegant coding (it works, it just looks ugly to me) and expose it to the user interface (so you can just give it layers in the Widget setup versus going into the code) in a future update.

Do these address your questions? Is it working for you otherwise? Thank you for the comments and feedback!