How to create a Thing, multiple times?

Hi,

I would like to know how to create a Thing multiple (create multiple Things) times from a single trigger?

thanks

4 Likes

From directly in bubble … “create thing until x” … it isn’t really possible.

You can copy an existing list of things to another list of the same data type. But you can’t say “for this list create a set of new things”.

You can potentially do it by triggering Bubble externally, but that would be heavy on your workflow count.

From a single trigger … don’t know how to do it.

1 Like

What is the use case? Not sure I’m following what you’re trying to do.

so… a User has many Vaults (thing) that has an address field. When a Task (thing) is created which has an address field I want to create as many Notifications (Things) for a each user who’s Vault is within x kms of the Task Address.

So, the number of Notifications that need to be created is based on the number of Vaults that are within the range. A notification had a User field and that’s how it is shown to that particular user.

Hope that makes sense.

Were you able to figure this out?

Hi there,

I was able to achieve my objectives through a re-design of my data structure with some limitations.

so rather than create multiple Notifications, I am only creating the single one, but then added an ‘address’ field which is only populated when for certain notification types.

I then limited the number of Vaults to 4 that can be associated to a user, and then in order to display the Notification I have multiple merged searches that looks to see if the vault address is within the range of the address recorded in the Notification.

hope that makes sense.

1 Like

I’m actually running into this issue at the moment, and here’s the use case: A purchaser wants to purchase 10 seats. I have a thing called a Seat, which has a start date, end date, and a user. I purchase the seat and it gets added to my Total Seats. I can then assign a user in my school to one of my available seats.

What I was looking for was a way for our school/district administrators to say, “I want to buy XX annual licenses” and have those licenses be associated to the School/District, NOT to the teachers themselves. While it’s easy to let the purchaser buy one seat at a time, it feels really tedious for the purchaser when they’re buying 50-200 seats at a time.

Is there any way for a seat to represent multiple seats? Have a quantity attached to it, charge accordingly, and assign to the administrator. Each administrator makes a 2nd assignment to a school user and completes seat info (dates) as needed?

I’m saying this without knowing anything beyond your description, but maybe instead of each seat representing a unique purchase, a unique purchase can represent single or multiple seats - and the entries created in your database are actually purchases.

Maybe?


Gaby | Coaching Bubble

That’s actually what I want to have done. I want to have one purchase equal “some number” of seats. What I can’t figure out is how to make Bubble create “some number” of seats in one action. When the user clicks the “Give Andrew Money” button, I want to charge them “some number of seats” times our price, then have that number of open seats available to the school.

1 Like

Right, what I meant was avoiding creating seats as a data entry, and instead storing seat availability inside a single purchase entry. Purchased quantity is given to the school(s) as their limit. It could hold number fields like “seats available” and “seats taken.” When a school takes a seat, the count in those fields change.

Give Andrew Money > creates 1 purchase

Andrew’s Purchase

  • Quantity = 50 seats
  • Cost = $500
  • Seats Available = 50
  • Seats Taken = 0
  • Assigned Users = list of school users who can “take” a seat

Again, there might be other factors in play that I’m not aware of, but I’m wondering if you can work with the seat data without having each seat be a separate entry.


Gaby | Coaching Bubble

I see what you’re saying now. I started down this path early on and changed my mind. Why did I change my mind? Hmm…

I’m going to take 10 minutes to think while listening to brain.fm about why I stopped this path. Thanks for your input! I’ll post back in a bit :slight_smile:

2 Likes

I remember! Schools need to be able to purchase licenses at different times, and we wanted to be able to track when each license would be up for renewal. Also, a teacher quits in the middle of the year… We want to know which license was assigned to that teacher (when it expires, mainly) so we can show the school what licenses they still have available.

Also worth mentioning, teachers do not need to belong to a school to have access to our system, they can have access as an individual. So Mr John’s signs up, THEN his school decides to adopt. Mr John now needs to be associated with a license from that school.

It all gets complicated quickly, and the seat model felt like an elegant way of solving the problem

Ah, I see. Yeah, there are a few more layers there. Even so, I feel like you can create a different cross-referencing system to avoid the “create multiple entries” on a single workflow. I mean, I’ve run into this a few different times too and since it’s not directly supported, I’ve had to workaround it… I wanted to do a bulk upload feature where each file was a different entry in the DB, and I just told the client we needed to cap it because I was creating an action for every new entry and could only do so many. But, this would be less practical in your case.


Gaby | Coaching Bubble

1 Like

I would agree with Gaby, you don’t seem to need the “Seat” things created at that time, you can create them “on demand” when someone asks for a seat. So check there are seats left, create an empty one, reduce seats left by 1.

However… it is perfectly possible to create x things.

Set up a table that has a single field, number, and create entries from 1 to 100.

Then run an Scheduled API that creates the seat on the list that is a search for numbers from 1 to x.

4 Likes

Thanks @NigelG! Two thoughts: I hadn’t considered your option of creating the seat at the time of assigning, then subtracting 1 from the pool. That was the part of @romanmg suggestion that didn’t register with my brain. Thanks for filling that in!

Other thought is that I’m not as familiar with how to use the scheduled API on a list of things yet. Need to play more there. Thanks you two!

I have Events to which Groups of Users can book seats (0-9). The Users can be part of many Groups and attend many Events. So the number of seats for each event needs to be in a separate Data Type (LinkUserEvent).

I then create entries in LinkUserEvent when the users for the first time clicks a button (More) to book seats.

Have a look at:
https://petertest.bubbleapps.io/version-test/selectevent

Maybe this can be done more efficiently - it’s a bit slow to load and update. :blush:

Has there been any movement on the ability to create a Thing, multiple times? After scouring the forums, the solution has always pointed to Schedule a List API or just “redo” how you handle your data. However, as I have read, it appears that there is no clear cut simple way to do this. Not to mention, if you have a lower plan, your option for scheduling is significantly limited… I’m on a personal plan and scheduling is pretty much a non-option (

Hoping someone has a solution! Especially with the new pricing/structure that happened recently.

3 Likes

Schedule an API on a list is the way to do it, usually.

You just need a “list” in the first place. Which can just be a table of numbers from 1 to X … And you limit the list to the number you want.

100% agreed Nigel - However, if Schedule a List API is not an option, like my Personal plan, there must be another way to tackle this issue. I tried the “Recurring” API workflow… But alas, same issue. Personal plans are “monthly” runs.

Since late 2015, this has been in the forum in some shape or another. Hopefully soon there will be a solution other than jumping substantially higher in price for a basic looping feature like Schedule a List API - Which itself isn’t a great solution from what I’ve read.

2 Likes

I also need this. My use case is that I’m building a checkout experience that allows a user to add multiple items (between 14 and 20 usually) to their cart. I’ve got everything working okay to let them add items one at a time so that’s fine. But from the users perspective, I have people who don’t want to add those 20 items one at a time (it’s a week’s worth of food that they’re pre ordering through our site). So I need to give them a button that let’s them bulk add the “Chef’s Choice” recommended 20 items for them and their family to eat this week.