Ok,
I’ve been sitting on it for hours and can’t seem to solve it…
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 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
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:
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
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.
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 …