How add rows in repeating group?

Hi. I need advice. I have repeating group with two colums and one row by default. I need add rows to this repeating group when user click the button. I guess I need to change count of displayed rows, but have no idea how to achive it. Thank you

It depends on what you’re looking to do / what the additional rows represent. I have a repeating group that is a list of ingredients in a recipe. When I click a button, it creates a new ingredient, and adds it to that recipe’s list of ingredients, which auto-populates the repeating group (i.e. adds a row). Is this what you’re looking to do, or are you looking for UX where a user controls how many items in the RG they can see? (i.e. ‘15 items, 30 items, 90 items’)

Yeah, that’s right. I need the user to add a row. The row is two columns with inputs. In these inputs the user writes values, then adds another row if necessary, and so on an unlimited number of times

1 Like

Got it. I would recommend a similar approach to what I described using on my recipe page. You can have your button tied to a workflow that does 2 actions: 1. Create a new thing (the thing should be the type that the RG is listing). This new thing can have blank fields, but once on the RG I would recommend auto-binding the data. 2. Add that thing to the page’s main thing (whatever thing the RG is displaying the list from).

1 Like

Thanks. I try it

1 Like

Thank you, it work. But now I have another problem. When current user create new row, its dispayed for other users who fill this inputs. For example: I created two new rows in repeating group. Its mean two new things in database. Next user will see not one row but three rows. How did you solve this problem? Thank you

In my app, the thing (recipe) that they are adding the lines to is a recipe created by that user. On all my search settings, I have the results limited and privacy settings established to only show recipes created by that user.

Could you explain your use-case a bit more? What is the thing you are adding lines to?

Thanks for your answer.
I try to create registration form. In this form user can add links to the social net. By default form contains just one row for add social net links. But when user click the button “Add row”, in repeating group must to add one more row. The problem is, I need to reset this form to default every time when new user register. Maybe I choosed wrong way for this goals?

I had idea to relate my repeating group (with inputs for social media links) with custom state of other element. And set data source of RG is (for example) elenent’s state name. But it’s not to work because button set state value just once and I get only one row in this repeating group. Maybe you have any idea how to solve my problem. Thank you

I believe what you are currently doing is showing a form with a list of things, and those things seem to be tied to the main thing so that any user seeing the form sees those extra lines.

What I would recommend doing is have a type of data called ‘Links’, with a field for URL, a field for type (i.e. Facebook, IG, etc), and a field for User. Have the RG show type ‘Link’ made by Current User. You can use privacy rules to restrict this as well. When they click ‘add a line’ it creates a new ‘link’.

You can even save each of those links as a list under the ‘User’ in a new field called ‘Link’ marked ‘list’ for easy retrieval.

This topic was automatically closed after 70 days. New replies are no longer allowed.