Automatically filter a separate table on a dynamic page

Hello there, experts. I have the following issue:
I have created a main page with a repeater. Upon clicking on one of the containers within the repeater, a dynamic page opens, which contains more details about the selected container and it’s content. All this is done with one collection which I will for now call “MainCollection”. On this dynamic page, I want to have another table which is connected to another collection called “MedalCollection”.

Basically what I want to happen is to automatically filter the MedalCollection table when the dynamic page opens aka changes it’s content. I have tried to do this by adding a column to my MainCollection called “FilterId” and giving it a number depending on the item (for instance: 1).
For my MedalCollection, I added another column called “FilterIdMedal” and give the items the same number as the item in MainCollection to which it belongs. (for instance: 1 if it belongs to the MainCollection item with the FilterId 1)

So upon the dynamic page loading, I want the table to only show the items from MedalCollection whose FilterIdMedal is the same as the FilterId of the MainCollection item currently shown on the dynamic page.

I have no clue how to do/code this in Wix so I’m currently quite lost. Any help would be appreciated.

I hope my problem’s description makes sense. Thank you! :slight_smile:

If I’ve understood you correctly, this doesn’t require any coding. You can use a Reference or Multi-reference field to associate the two tables, and then, for the secondary dataset on your dynamic detail page, set the filter based on the primary dataset.

For example, on a law firm website, we have a collection for ‘Expertise’ – that is, for the firm’s practice areas. We also have a collection for ‘People’ – that is, for each of the lawyers. The People table includes a multi-reference field where we record each practice area (or expertise) that lawyer belongs to.

On the dynamic page for each individual Expertise, we include information about that practice, and we also have a repeater with names and photos of each lawyer (People) who is connected to that practice area. Here’s the secondary (People) dataset filter for the dynamic Expertise page.

That worked (much simpler than I imagined it) , thank you very much for your help!

1 Like