Nested Listview, referring nested listview to their parents

Hello!

I'm having trouble playing with nested listviews to display information according to their parents. Lots of the documentation is based on the old listviews.

I'm trying to display projects in listview3 associated with the team members of listview1. I feel I'm close. I tried the documentation on listview from retool but it's not enough for my case. It helped me with my SQL query tho.


image

I would appreciate any help!

We're working on improving the scope usability in List Views. Something that might be helpful here is here is referencing the parent list view's item scope from within the child via listView1.item.

Assuming your listView1 data has a key called projects equal to array of projects, your inner list view's data source can be set to {{ listView1.item.projects }}

2 Likes

@andoliveyou Thank you for your reply and sorry for the late response.

It kinda worked, but instead of listing the items in different containers, it put it in the same one. Might be cause of my query? The relation to the parent does work tho.

Any further insight would be appreciated! :slight_smile:

It looks like you set the Primary Key to {{ listView1.item.projects }}, but it should be the data source that is set to that. The overall structure should look like:

Outer List View, aka listView1:
  - data: {{ query9.data }}

Inner List View, aka listView3:
  - data: {{ listView1.item.projects }}
2 Likes

It worked ! Thank you.