Filter RG by number range

I have a repeating group that I need to filter based on user provided input. In this case the user input is a range of numbers, i.e Age, Currency, etc. So when the user supplies the numbers, the repeating group needs to update and only return the data which has a number within the number range.

Eg. Give me a list of all the users between ages 20 and 35

I’ve read around the documentaion about number range and it doesn’t seem clear that this is possible.

I’ve attached a screenshot of my RG

You see I want the user to be able to create a number range and the RG to return data where the age is within the number range. Even more, it could be a list of n umber ranges. eg. ages 20 to 25 and 32 to 40

Is this functionailty even possible?

If you want fixed options, I recommend using option sets, create an option set with 2 extra attributes, in display put the ranges (like 25-30) and set the other 2 atributes to minimum age (25) and maximum age (30), after that configure each option you want to display (you can find enough info abour Option sets in the forum and bubble’s manual). Now use a dropdown or multidropdown using the option set as options source and add the conditional to your RG “when the dropdown value is not empty → data source= original RG datasource:filtered ->filter: current thing age is in dropdown value option set’s minimum value<-range-> dropdown value option set’s maximum value”.

If you want the users to enter their own ranges, forget option sets and use 2 input box, then set the filter feature using those values instead of the option set minimum and maximum values. Maybe you will have to add some wctra conditionals around to avoid bugs.
Hope it helps.

1 Like

Of course your proposed solution makes sense., and is trvial to implement. I just wish things were less hacky. I feel like there’s a lot of functionaility that should be available out of the box. :woman_shrugging:

Everyone feels that way now and then, but believe me, this kind of flexibility is what makes bubble different from other no code platforms (and more powerful). You get used to it :slight_smile:

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