Complex Algorithm in Bubble?

I’m building a scheduling program that books appointments.

I need to create an enormous list of available appointments for each employee that looks like the attached.

There are 2 hour appointments, full hour and half hour. That’s what those huge columns are. All available times for a single employee. There are half a dozen employees and they are Things in my app. So, this data will be attached to an employee Thing. It’s the individual employee’s schedule, so that makes sense.

Questions:

1. How do I add all these times to my employee Thing? Is this a case where I create a new field in the database for my employee Things and select the “multiple entries” checkbox because I have many of these appointment times to create?

2. I need to work through this table. with an algorithm. As users select appointments from the huge table of available appointments, I have to calculate ranges of times where the appointment occupies several items on this list of open times. You can see in the attachment on the far top right, there is a “Booked Appointments” list. See #1 in the “Booked Appts” list? That was someone clicking on the 12:00-2:00 entry in the 2HR Times column in the attachment. Then, I have to parse the columns and knock out available appointment times this #1 appointment runs over. In the attachment, everything with a #1 in a circle next to it is knocked out by the #1 appointment. Then I have to re-save the lists with only available appointments in them for the next round. #2 under Booked Appointments list would be the next one booked that repeats the process of knocking out availability as you can see by all the times with a #2 in a circle next to them… and so on until no more availability.

WITH ALL THAT IN MIND…

I need to do some pretty complicated algorithms that I can do in other programming languages without too much trouble. How can I do this in Bubble? Is there a way to integrate a script or some code into a bubble project so I can call it to manipulate this data? Or is there some other way to do this that would work best in Bubble?

Thank you !!!

Check out @boston85719 scheduling template - might be able to have 80% of what you need already done

Plus he also does coaching so he could teach you how it all works/help you with any customising you might need

1 Like

@sarsasparillaj this is the scheduling template that @equibodyapp is referencing

This one might also be of interest

Looks like I ran into a sales team instead of anyone who knew the answer to the question.

So the ACTUAL answer to my question is you need to host a Node.js/JavaScript program with an API somewhere and connect this API to Bubble. Bubble does not provide any space (as far as I can tell) to put some code to do more complex algorithms.

So I’m setting up a Node.js installation on one of the pay as you use hosting services and putting together an API to send my Bubble data over for processing. Then it’ll return the list of appointments I need so they can be worked through in Bubble.

The worst part? The Boston guy’s template DOES use the answer to my question (you have to do it using an API) and he purposefully withheld the real answer to hawk his wares. Not cool. At all.

@sarsasparillaj

I understand you are new here and probably have not spent enough time on the forum to have a clear idea who others might be. Here is a snap shot of my summary page

As you can probably see there I am very active on the forum and regularly give back to the community with free advice and providing solutions.

Your question was not a question that was a question that could be answered in a forum post. Also, my template does not use the approach you implemented. I am actually not a coder, so would never actually be capable of implementing the type of code based solution you did.

Not really. I didn’t purposefully withhold an answer. I just didn’t provide an answer as the complex question you asked would take a considerable amount of time to explain…and like you, not everybody on the forum knows who the others are, or there background or their level of technically experience.

Would I have been able to provide you the solution you came up with? No, because it is beyond my technical capabilities.

One thing that you should remember about the forum is that it is a place for people to share information with each other. When somebody takes the time to provide a reply to a question it is out of the kindness of their heart. Nobody is duty bound to provide answers to others questions.

Something that I’ve said on this forum in the past for other situations is true here as well. You can not be disappointed in what others do solely based on the fact that what they did was not what you had expected from them. Having expectations of others usually results in disappointment.

My providing the links to my templates was done because another user referenced them to try and help you. If purchasing a template that is a complete product and provides all the functionalities you need was not what you were looking for in an answer, then it could have been gracefully ignored and just wait for another user to possibly chime in and provide an answer.

A lot of times on the forum people are looking for solutions to problems, and the offered solutions may be to use a plugin or a template that others who have come before you created to help the community. And yes, selling a template does help me monetarily, and it also helps those who want to avoid the time investment of building it themselves. Plugins and templates are very powerful components of the Bubble ecosystem that helps others build faster and go live with a product faster.

Boston85719 is an expert Bubbler with a decade experience as an educator. Real name Matthew, he has been actively building SaaS apps, marketplace apps, scheduling apps and more for clients, himself and for sale as templates.

As an official Bubble Bootcamp Instructor, he leads Bubble Bootcamps on a regular basis.

Always willing to offer advice via the Bubble Forum, Matthew also offers Private Personal and Group Training Sessions.

Always accessible you can send Matthew a private message via the forum or send an email directly with your requests.

Be sure to checkout the Stripe Integration Course when you are ready to integrate Stripe payments to start monetizing your application via product sales or subscriptions.

6 Likes

‘The Boston guy’ is actually a very genuine, helpful person who donates a lot of his time answering questions on the forum. I don’t think anyone needs to apologise for making money off their education and expertise that took a lot of time and effort to gain. Would you expect your accountant not to invoice you for their time?

I think you’ve found an answer that’s completely overcomplicated what you need to do. Bubble does allow you to run JS.

Scheduling is quite a complex subject and not something you can teach over a simple forum post - it’s also not something you need algorithms for to achieve though. Many people have done it in native bubble (like Boston), and many people have thought the price of his templates incredibly valuable in terms of the time you save and the functionality you get…but you do you.

3 Likes