Search filter by number is a pain!

Hi!
I have two fields. Let’s say: MIN and MAX and a have a Entry in database with Field type - Number.
I need that:
If users types in only MIN number (max value is empty) - Search would display entries where Number is THIS Number or Greater.
If users type in only MAX number (min value is empty) - Search would display entries where Number is THIS Number or Less.

There are several problem with this:

  1. Because currently in Bubble there is no search filter option for number “greater or equal” and “less or equal” I can only select > or < operators, but in that case Bubble will find all the records where number is less or greater without including entered number. Example: Min is 1 - Search filter is > 1 - Bubble will find records where number is 2 or Greater
  2. I know that I can use a workaround and add +1 for < operator and -1 for > operator (to include entered value), but guess what - It doesn’t work if value is empty.

I know that I can make a different search filter with - ONLY WHEN scenarios - but if I have 5 numeric values that I need to search that means I have to create 10 Search Filter for each scenario.

I really hope that this topic will be focused by Bubble developers because this is a quite fundamental things that need to be available in Bubble.

Thank you.

There are greater and equal and less and equal conditions.

Please show me:

Price has type Number

1 Like

You are right. What an uncomfortable surprise. I was thinking that any conditionals available in Bubble would be available everywhere. This seems like something that @emmanuel and @josh could add quickly.

3 Likes

@marca @emmanuel @josh guys, can I have your attention on this topic please?
I truly believe this is a very important feature missing in Bubble which can be implemented in Bubble in no time.

It’s on our list. Adding new database operations is significantly more work than addIng new composer expressions, though, so it’s not as quick as you’re guessing

1 Like

If I’m not mistaken, the greater/equal and less than/equal operations are also available when you use the :filtered modifier after a search or list expression. I don’t have it in front of me but try that?

Your right you can filter with advance option after initial search, but if there are at least two advance filter Like Greater or Equal and Lower or Equal only last one really works.


With this filter I can input only higher value and there will be a perfect search, but if I enter only lower value - there will be no search results and Bubble will show Warning message : Your page has downloaded more than 2 megabytes of data via searches. This can slow down your app, you could look into simplifying it to download less data.

Long story short: your workaround is working when all search parameters are entered but I think making 6 (to filter only 3 numeric value) advance filters is quite a heavy load for the server.

@petrucho Hey!

I agree this is a great feature that was probably overlooked so we pushed it up on our todo list. [New Feature] Greater/Less than or Equal to numerical search filters It should be live now so let me know if it helps you with your use case!

2 Likes

@riley man, thank you so much! This is feature is needed a long waited! Thank you, thank you!!!

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