Sending Data in a Repeating group to database

HI,

We have a feature, where the users can bulk select products using checkbox and then exclude them from the catalog in a single click.

As shown in the image below, We have selected 3 products out of the available 5, now when I hit on the exclude products button on the top right, it should pick up all these three select products and sent it to our database through a workflow. I am not getting how to send just the selected products and as different rows to the database.

Currently, when the checkbox value is changed we are saving the current cell’s value in the local bubble database and then sending it to external database by combining the same as an array. The issue with this process is that it is slow and is not reliable.

I am looking for a way where we can send the selected rows as an array to my external database. The array will look like the following
[{“productName”:“”,“productSku”:“”},{“productName”:“”,“productSku”:“”},{“productName”:“”,“productSku”:“”}]

Any help here would be great.

Thanks in advance

A question on this. How do you save in “local database”? I only know of custom states. Is that what you meant?

But those are really hard to manipulate when they are of list type.

Hi @mghatiya:

Just saw your message, sorry for the late reply.

You can create a table in data section of Bubble to contain the columns which you want to save. Use a workflow to add data to that table and then finally while hitting your server pick data from that table and hit.

If you could briefly tell me where and how do you want to use this, I can better help you here.

Okay, so you end up creating a thing in production DB itself, right? It is not like you create a thing only in client side and when everything is done, you create it in the production DB, isn’t it?

Say, there is an interface where user can create a sub-user for themselves.

Currently “Create a new thing” creates a new object in production db itself. Now if user abandons that page, I would need to remember delete that half done hanging thing. Is there a way that I create a temporary thing, and then commit it to production db only when user says “save”.

You can achieve this by the following steps

  1. When someone adds a sub-user, you can keep adding the details of the sub user in the thing which you have created. Once they have entered the details you can push it to your final DB or Server.

  2. Now once the data has been pushed to DB or Server, the workflow which does that will also contain another workflow event which will delete this sub user from the thing which you have created.

  3. Now you can also clear this thing which you have created if the user leaves the thing semi done by just doing clear the list on page load. So every time the page loads, you will be clearing the list and then next time when the user is adding a sub user you will again create a new thing.

Hope this helps, If you are still confused, I can show some examples of the same.