How to create a nested list setup with a parent and children

Hello :wave:
Looking for help to see if the below is possible.
I have an array that contains parent text and each parent have one or more child text. I want to display the parent in a collection list, but also show the child within a nested collection list inside of the parent list.
Think of it as nested lists. So far I’ve been able to populate the parent but have not been able to figure out how to filter the children to only display for their own parent. Instead I end up with all children displaying for every single parent.

Thoughts?

Hello @GooglyOwl,

You could take a look at two formulas to do what you want, it will depend on the structure of your data

  • FilterByKey(): If you have the information of the parents in the children table
  • lookupArray(): To match the id of the children of the parent and your children information

If you could give us more detail about the structure of your data, I would send you a more detail answer :slight_smile:

1 Like

Hi I am trying to do this now. Can you provide some more information. I have several topics and each quote belongs to one topic. I want the list to display topics and when user selects a topic, the list is then the quotes that belong to that topic.

I think I have the same issue - (please correct me if not) I want to create an overview over referenced fields. I am struggling with the repeating of the elements. Lookuparray and map are working great together but it gets tricky by referencing to a referenced table. Any tips?

How do you want these tables to work? Clicking on a row of a day replaces the table with another scenes table from that day?

The Idea is for a user to set up this list. So the user has to create a day through a form and then populate the days with scenes and again the scenes with more content.

The best way would be, by clicking on the row in a day opens a modal or new page, that lets the user edit the information inside the content table.

The blue scenes table would actually just be there for grouping the content together.
Does this make sense?

Ah okay, that makes sense

Are you getting this data from a backend? If so, best way is to already prepare this structure in your backend response

After this you can just easily do a repeating list of scenes in another repeating list of days

Clicking on a scene sends the id of the scene to the backend and receives the content which you can display in a modal

Thank you for the reply. Yes - for now I am still using Airtable as my DB.
By preparing you mean filtering?
The problem I have in weweb, is the displaying of the repeated elements in the desired groups.

Ah! You’re using airtable so im guessing you have 3 collections for days, scenes and content and you want to do the above described







Thanks a lot Luka :smiling_face_with_three_hearts:
I could propperly link the tables and display the data. It’s not that hard actually.
Thanks again.

Great! Happy building :slightly_smiling_face: