How to send all of the data from Repeating group and send to API?

Hi,

I have a repeating group that I pre populate with some data. The user can only change the quantity. I used a simple text box for that (no popup). Now, I want to submit all of the data from the repeating group to an API. Note, that I am not looking to send individual items of that group to the API, but everything in one shot. Think of this as a template - the user adds their info and when the submit button is pressed, an order is created with all items. The user can only change the quantity.

How can I achieve that?

Thanks,

@sonukapoor when the user updates the quantity, aren’t you saving it in the database?
If not, you can try saving the number in a custom state (just make sure the order remains the same).

But it’s safer to save it in the database.

If what I said makes no sense, please add some screenshots so I can understand it better :sweat_smile:

@lucas.moura I am not updating the database as the user changes the quantity. I need to create a new record in my database when the entire repeating group is populated. I have no idea how to use custom states. If I save it in the database will that persist forever? I dont want that either. Ideally, I do not want to use the bubble database at all if I can.

@lucas.moura Can you help? Maybe I am misunderstanding this. Let me try to explain this again:

  1. I have a page with a RG. That list is populated from an API call. Say it returns the fields Product Name, Product ID
  2. In the RG, I show these fields along with an input element allowing the user to enter the quantity they want to order.
  3. Each RG row has no button or anything like that.
  4. I want to place a button outside the RG to send the data from the RG to an API.

If anybody could provide maybe a simple example that I can use that would be very appreciated.

Does that make sense?