2 Layer filters for Repeating groups

Hello Everyone!

I am building a product which presents data pulled from Airtable
It requires 2 level filters

Level 1 (Sample Data : Genre) : Articles, Books, Videos, Podcasts
Level 2 ( Sample Data : Sub Genere) : English, Hindi, Other local languages

According to the flow

  • When the user taps button with Level 1 options, the group with Level 2 buttons is visible.
  • When user taps on button with Level 2 options, The repeating group list is revealed

To present the repeating groups with these selected filters intact, i am using individual flow for each buttons of level 2 as shown in below screenshot.


Thats a very lengthy process already with 24 buttons available in Sub Genre
Any better way to do this?

Hey @sekhar2193 :wave:

Thanks for reaching out and great question!

Have you considered using two dropdowns? One for genre and one for sub genre? Once the genre one is selected, you could show the sub genre one and filter the available options to only show the ones that pertain to the genre dropdown’s value. When both dropdown values are not empty, you could show the repeating group where you dynamically pass in the value of both dropdowns as constraints for the list. This would allow you to handle everything much more dynamically so you don’t have to specify separate conditions for each combination.

Give it a try and don’t hesitate to reach out to us with any specific questions to support@bubble.io

Hey Andrew
I understand that it would be easier to do with dropdowns, but somehow with my Product
Multiple taps seems to be the right way to present

Let e explore, thanks for your help

Sure thing @sekhar2193

Happy to help! And, I completely understand. Gotta do what you feel is right. And, even with that approach, you might still be able to make this more dynamic. For instance, what if you dynamically passed in the Airtable genre and sub genres into two button repeating groups? You could basically do something dynamic and similar to what I explained with the dropdowns.

When a button in the genre repeating group is clicked, you store the selected/clicked item in a custom state and show the filtered sub genre repeating group based on the custom state you just stored. When that sub genre button is clicked, you store that in a state as well and conditionally show your filtered list that dynamically filters based on the values of the two custom states.

“For instance, what if you dynamically passed in the Airtable genre and sub genres into two button repeating groups”
Hey @Andrew.Vernon When i do this, its unable to pull unique values, i checked on Forum, and the logic works like Unique values by the entire row, rather than just a column

Hey @sekhar2193 - I’m not familiar with your Airtable data structure, and this relies heavily on how that is set up on your end. But, if you set them up as two separate repeating groups, one for Genre, one for Sub genre, bubble should be able to tell them apart, filter them separately etc.

Depending on how many options there are, you could also consider two radio button inputs, one for genre and one for sub genre for this as well.

If this kicks up any additional questions, feel free to email us at Support@Bubble.io

This topic was automatically closed after 70 days. New replies are no longer allowed.