Forum Academy Marketplace Showcase Pricing Features

Multiple Similar Do a Search For's

In my app i am creating a dynamic calendar from first-principles.

I have a repeating group with each cell representing a day and logic setup to fully mimic a calendar

For each day I need to retrieve two data types, and there are 3 Time-slots per day. These dont necessarily exist for all days/time slots; the searches can return empty. The first time I built the page, I put “do a search for”'s in each cell. That adds up to a whole lot of “Do a Searches” on page load and every time the month is changed. It is also a search in the datatype with the largest entry count.
This felt very dumb, because all the do a search for’s are very similar (eg, Date is only a few days apart and Time slot is between 1-3). Why was i making bubble do all these searches? I realised i could just make one query by searching all Dates in a particular month and all time slots. With a single search i would have all the data i need to display on the page in a list. But after that what? I thought about using client side filtering to filter from the full month data list the individual day data. They are simple filtering actions (Date=Date, Time slot=1-3) on a relatively small list (<90)… but there are around 100 filtering actions (6 per day-cell), so that doesn’t feel right.

I feel like both approaches are not optimal… i’ve been stumped all day. Which one should i pursue? Is there a third option which is better and i’m not seeing?

Have a great day and thanks in advance

Yeah, doing this in vanilla Bubble is… d… well, not very efficient. You’re going to have to resort to custom code here.

I actually built something similar in vanilla Bubble, but it was so painfully slow that it was unviable as a commercial solution. (That being said, I actually had paid customers of my first Bubble-native version, warts and all.)

I have two paid plugins that help with this as a result: Calendar Grid Pro (a very novel date/date-range picker that actually inspired some of Airbnb’s work in that area – it uses moment.js) and Parallels (a more modern pure data-processing plugin that leverages Luxon to do MOST of the same tricks, but has no visual front-end.).

Since you’re the DIY type, you won’t be interested in the paid plugins (though I’d encourage you to test them out and follow my videos about them), you’ll probably just want to read/watch everything I’ve ever published about dates. Search “@keith dates” to learn more.

In short, you’re going to have to learn to code some stuff. (It’s not that hard, really.)

1 Like

Hi Keith, I have actually stumbled upon your Calendar Grid Pro plugin and a few of your forum posts! Thank you for everything. I’ll look more in depth at your forum posts.
I’m all for paid plugins but the only reason why I didn’t go for Calendar Grid pro is because i need an event displayer calendar, not a date picker. I will definitely look into integrating Parallels in the back-end, great plugin.

I’m also all for coding. Integrating coding in the areas where bubble is d… lacking, feels like a great idea. (I absolutely love bubble btw ahha) However i have no clue where/how/with what to set up the codes… We have the java plugin toolbox for some front-end data/numerical manipulation. Is that what you mean by coding? Is there a way to get coding integrated in the back-end or in between the front and back end?

For people’s future reference, I discovered that the bubble-native functionality ":group by’ can actually be used to limit the number of searches queried to bubble to 1, while also avoiding client side filtering.
It is a very powerful tool and i recommend trying to implement it in scenarios where you find yourself making many similar Do a search for’s in a single page.

In coding, this would be the similar to constructing tensors, something i erroneously thought bubble lacked.

I discovered its potential now that im building in-house metric, kpi, cohorting and analytics dashboards, and the “group by” functionality proved to make this all possible. Really wouldn’t be possible without it.
I have yet to try implement it on the customer facing side but it seems to me that it will be optimal also when implemented there.