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.