How to implement a list within a list

hey guys, so for example, i want a ‘favorite movies database’ with the following conditions:

-user can enter as many genres as he/she wants
-and also, user can enter as many movie titles as he/she wants under the genres
-user can delete a genre or a movie
-user can edit a genre or a movie
-user can rearrange the genres or the movies



HORROR (press arrow down to move this genre list down)
–texas chainsaw massacre, 2006, 6.5 stars
–the shining, 1976, 8 stars
–thirty days and nights, 2008, 9 stars (press arrow up to move movie up)
–[+] (add another movie)

THRILLER (press arrow up to move this genre list up)
–the hotdog man, 2020, 9.8 stars
–[+] (add another movie)


so i guess if im going to implement these, the data types should look like the following:

(data type 1) movie details
movie name (text)
movie year (number)
movie rating (number)

(data type 2) genres
genre name (text)
movie examples (movie details list)

(data type 3) user
user name
favorite movies list (genres list)

what’s the easiest and the best way to implement the workflow of these? any suggestions? have you implemented something like this? know of tutorial that shows how to get something like this done? im so confused when implementing the inputs inside a repeating group so maybe there’s a better way. please advise.

It seems like it would be best to be a RepeatingGroup of Genres and in the cell of that repeating group you can add another RepeatingGroup of current cell’s Genres’ Movie Examples. You can add conditionals on each cell to hide it’s RG of Movie Examples unless it is clicked to act as like a drop down effect. Adding new movies or new genres can be done by directly under the repeating group adding a group that is styled exactly like the RG cell’s except it will have input’s for entering in new data and then a submit button or icon. In order for that cell to move correctly with the RG you will need to group the RG and the “add new” group and make collapsible when hidden so that if any of the genres’ movie examples are not shown the add new will stay “attatched” to the bottom of the RG. This will prevent from having to use rg input logic on the genres “add item” function. But if you do the same thing in the nested repeating group for adding a new movie then when the submit button is clicked it will create a new movie using the inputs within that cell and make then make changes to current cell’s genre by adding the newly created movie in the previous step.

1 Like

Here is an example:

Here is the editor:

Damn bruv, thanks a lot! I will digest all of these and get back to you if I still have questions. Appreciate it! :innocent:

1 Like

Hey bruv, good morning!

I’m stucked at the part where I need to set state everytime the Genre Right Arrow icon is clicked. I get an error in the workflow that says “Set State - is not a possible option”. And the add movie button indeed cant be found in the list of options. I was wondering how you are grouping these elements… can you please provide me a clear picture of how these elements are grouped? Sorry, I’ve been trying to figure this out for 3 days and I can’t crack the code lol…

That part is just setting a state to an element within the genre cell. You can choose any element there and give it a custom state with a yes/no value. This will let that cell know if it is hiding or showing more than just the name of the genre. I am not sure how I can provide a crystal clear picture of how everything is grouped only because with the way the repeating groups, especially nested repeating groups work it is a little more complex. But essentially any workflow started by using an element within a repeating group’s cell can access any other element in that cell. If a workflow is originated outside of the cell then accessing any element info within the repeating group is not possible.

1 Like

Thanks, I’ve made some progress after my message above. I think I’m just missing some few settings and it should work fine eventually. :]