Filter Widget like the availabile functionality in AGOL

8818
19
06-23-2015 10:03 AM
MelanieHammond1
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
RickeyFight
MVP Regular Contributor

Melanie,

This is what I have come up with for filtering.

You have to pre define all definitions before you deploy the app but it will work. (it only does one layer at a time but multiple attributes)

ArcGIS Web Application

PascualBenito
New Contributor III

Hi Rickey Fite,

thanks for sharing the link illustrating your filter widget. Would you be able to share/post the source code (e.g. zipped widget folder)?

0 Kudos
RickeyFight
MVP Regular Contributor

Pascual,

The code is on GitHub it will take some work with the code to get working. If you want help with it just email me.

This is the one I worked on

daFiter/localLayer_filter · GitHub

Stan worked on this one. It is a little different but basically the same code.

smcshinsky/filtertest · GitHub

PascualBenito
New Contributor III

Thanks for the Github links Rickey!

I'll take a look and let you know if any questions.

0 Kudos
HunterWest
New Contributor III

We have had a lot of requests for this and it has been formally added to the WebAppBuilder enhancement request list. Usually this means that it will be included in core within a few releases.

MelanieHammond1
New Contributor III

Thanks Hunter. Looking forward to it.

StanMcShinsky
Occasional Contributor III

This will be great Hunter West​ thanks for the update.

-Stan

by Anonymous User
Not applicable

Hunter, may I ask if ESRI has considered adding a Selection/Query widget? Like this one - Selection Widget Updated Version

I was just looking in to creating one.  The core functionality is already open source by developer Dean Brandy as I have reposted here AGS JSAPI App​  Although if ESRI plans to release this I may consider using the official widget if it offers everything these do. 

Has this been a popular request?

HunterWest
New Contributor III

Hi Kevin,

Honestly, I'm not certain if this is on the Web App Builder roadmap or not at this time.

However, as I'm sure you're aware, Web App Builder does have a "Query" widget that can be used as a "Select by Attributes" tool depending on what you're trying to do.

If you're trying to see only the query results in the attribute table, then check the option to create an operational layer, navigate to your attribute table via the arrow at the bottom of your map, and the new layer with only the selected records should be one of the tab options in there. Alternatively, if for some reason it is not there, open your layer list, hit the drop down arrow next to the operational layer, and click "Show in Attribute Table".

If you're interested in editing a selection then our "Batch Editor" widget can be used. This should allow you to edit using "Select by Location" or a "Select by Feature" functionality. This widget can be found here in our open github repository.

As far as *directly* addressing your question -  widgets in Web app Builder will have the ability to communicate with each other in the near future. This would presumably mean that the query widget would be able to directly communicate with the attribute table widget to reflect your selection directly.

Hope that helps.

Thanks,

Hunter