Save data from repeating group with external button

Ok,
I’ve been sitting on it for hours and can’t seem to solve it… :weary:
And I’m pretty sure the answer should be simple -

What I am trying to create is a repeating group of items that includes input of amount and via an external button of saving the products that have over 1 in amount will be sent to the database with a name of the creator of course

I read a few things about Custom State or the API but could not figure out how it would help me…

thanks in advance :raised_hands:

@adirco.digital

Hi!

Perhaps watching a video (30mins) of a simple app being built can spark some ideas (not a tutorial) > Build a full SCRUD application without code with Bubble in 25 minutes

I watched, this video does not help me so much… :no_mouth:
There is no button that saves data from Repeating Group

1 Like

Try this one by @gregoryjohn Editing Repeating Group Data | Bubble.io Tutorial

It walks you through an edit but the logic is the same for creating. So … instead of changing a thing you create a thing.

1 Like

Thanks, but no, that’s not what I meant, I’m trying to save information from existing input in Repeating Group

Please show a screenshot

It is intricate to explain. This video should show you most of what is needed > Create and save list selections | Bubble.io Tutorial

Thanks again…
But I have already watched this video, the guide is excellent but it does not explain how to save the value of the input in Repeating Group but only shows how to save the items names/photos

@adirco.digital Your posts describe:

  • An rg with a text cell and an input element on each row
  • An external button
  • A dB made of item, order, user. I can guess the items are related to orders but do not know exactly how
  • Two flow attempts when the button is clicked and input’s value is changed

For your consideration:

  • I am going to guess that the way that an order and an item are related, is that the order has a field type > list of items
  • Within the context of the UI that is shown, it seems that you want the user to choose the rg rows dynamically to add items to an order.
  • So … think of clicking an rg row (or an rg button element) as adding something to a list. Right now the rg has an input element which does not make sense to use, just for the purpose of selecting an rg row item.
  • By either clicking on a group within the rg row … or a button … or an icon … will enable you to create a flow with an event “if this element is clicked” then do … XYZ.
  • So … assuming the above is in line with what you want to do. Then this list where we are adding the selected rows to … can be either in the dB or on the page temporarily in a custom state type list (in your case a list of items of an order)
  • The way to add items to a list that is on the page is by setting that list in the custom state value: plus item … and when you want to substract … :minus item. (you would to the same to a dB list … but instead of using a set custom state command … you would use the modify a thing command)
  • Here a screenshot example of adding one user to a group called sandbox and a list state called users:

The expression above is sandbox’s users:plus item current cell’s user

Hope this makes sense and have fun building! :+1:

2 Likes

I still dont understand how I can save the input value per rg row…

Seems you do need to use an input per row for reasons of the logic that you want to build. Since they are unknown let me try to provide with further comments for your consideration.

Think of it like this:

  • The rg is displaying existing things
  • The input is an input … you are allowing your user to input a text? … a number? … a password?

Now:

  • What you could do is add a button to the row and start a workflow to use that cell’s input value to do XYZ…
  • Alternatively you could use the event “an input value changes” … but things get more intricate because the input should have a default value in the first place … so I recommend to consider doing the above if you want for some reason need to use inputs in rg rows

I do not want to add a button to a row because there are so many rows and the user will go crazy if he has to click so much…

I’ll explain again -
What I’m actually trying to build - a market app that the user sees a lot of items and chooses the amount he wants from each item
And if the amount of an item remains 0 then it does not save to the database

I had the same issue, and the solution was to use Orchestra plugin

Have a look at this topic and the editor

hi, thanks for reply
I installed the plugin, but sorry I’m newbie I still cant figure out what I’m supposed to do :tired_face:

here is the app

What you want cannot be done the way you want to do it. The repeating group can’t be empty so you have to first create data to be displayed if you want to edit it.

I made changes in the editor so have a look but you just need to find the User Interface workaround for this and then use the technique in the app if you want to give the user the ability to edit the list.

@bartek.dev
@adirco.digital

Perhaps this repeating groups tools plugin by @gaurav could be useful

1 Like

First of all thanks again,
But I dont think you understand the intent of the app,
The goal is to let each customer choose the amount of products from each product and that way I will know to send them accordingly …

Looks great, is there anything similar for free?

When you find it please share it :+1:

Should you choose to work with it you will not regret it. @gaurav provides awesome support.

1 Like