Select to view content in your preferred language

Use Button to filter list

6595
15
Jump to solution
11-19-2023 02:45 PM
ChrisRoberts2
Frequent Contributor

Hi All

Is it possible to use the button widget to filter  the values in a List Widget?  For example I would a couple of buttons with the main stakeholder types.  When the user clicks one of the Buttons, say Government,  the corresponding list filters down to only show those that are a Government stakeholder.

Thanks in advance

0 Kudos
15 Replies
RobertAnderson3
MVP Regular Contributor

Ah if it's supposed to be something different that's fair, just quickly then, in my case I am looking to show infrastructure projects based on the year started, designed to replace the Shortlist Storymap template.

RobertAnderson3_2-1702671323132.png

I have a layer view created to not include unapproved projects (year set as 0) or in the future I will do the same for older projects once this app has been around longer and they're not as relevant to the public.

I have a default option on the filter (2023) and only want the user to be able to pick by year, no need for an all option, and have it filter the list widget and the map widget. The pills are more user friendly than the drop down I find. The filter was just the cleanest way I found to do this.

RobertAnderson3_0-1702671192633.png

If what I'm looking to do is radio buttons for a list, how is it recommended to implement this in ExB? Is there an existing widget/development strategy, or a planned widget in the future?

Thank you and have a great weekend!

0 Kudos
MichaelGaigg
Esri Contributor

Ah, thanks for posting this example, this makes a lot of sense. In your case the radio list is correct because you do have a default value and you toggle between options to filter the same dataset. Actually the previous version with tabs used the wrong UI element (tabs are supposed to navigate between different sections of a site, not to filter). I like your visual design too, look really nice, dark themes are difficult but you came up with a nice palette.

0 Kudos
RobertAnderson3
MVP Regular Contributor

@MichaelGaigg No problem, sometimes the easiest is just to show what we're looking at trying to do! And thank you I'm glad you like it! I can share the whole thing with you too if you'd be interested in seeing before it goes live.

Okay so radio button list is the right thing to do, is this possible to do in Experience Builder? Or is the filter widget as I have it set up the best way to do it right now?

The previous version is a direct Esri Classic Story Map template that has been deprecated, hence the need to rebuild it. I'd definitely be interested in talking about the challenges I've been facing in rebuilding this classic Esri favourite!

0 Kudos
ahargreaves_FW
Frequent Contributor

@RobertAnderson3  and @MichaelGaigg I'm after exclusive radio buttons (or pill buttons) also. Here's my use case:

  • Dataset has data covering last 30 days
  • I want filtering options covering: 24hrs, 72hrs, 5 days, 10 days, 30 days
  • I can easily do this via Filter widget but the user is able to select multiple filters and that leads to a frustrating user experience.

ahargreaves_FW_0-1706215947906.png

 

GISNCC
by
Occasional Contributor

Hi Robert. @RobertAnderson3  I am doing a similar site with an app with various projects that I want to filter by things such as project type or year.  I am wondering how you configured your pills to look so nice.. For the out of the box filter I am getting this type of look with no options under Style to change the colour, rounded edge on the pill etc.  Thanks heaps!

 

GISNCC_0-1723283465049.png

 

RobertAnderson3
MVP Regular Contributor

Hi @GISNCC 

Unfortunately it has been a long time since I've looked at this, I don't remember how I got these set up this way, I went in quickly to check and I don't see options either. I vaguely remember it being one of the pre-set styles that would pop up in ExB with certain elements but I might be making that up.

Sorry I can't be of more assistance right now, hopefully someone else in the community can be!

0 Kudos