Dynamic list in a repeater?

I have a repeater that is connected to 2 datasets:
1 master (statues)
1 detailed (materials: wood, stone, ivory, etc).

They are connected through a multiple value referring field. Some statues are from both wood and stone, etc.

I would like to have a list of materials displayed dynamically in the repeater according to each main element (statue).
I cant add a list element in a repeater so that i can run a filter in Detailed with Master.

What do you recommend me, please?

I looked for other articles but no solution found.

Regards,

Dennis

Maybe you should consider creating an afterQuery hook that uses queryRefrenced().
and returns an array of materials:
https://www.wix.com/corvid/reference/wix-data.Hooks.html#afterQuery
https://www.wix.com/corvid/reference/wix-data.html#queryReferenced

Is there any solution that does not involve coding? Could it be done with Boolean values? Maybe move everything in a single db?

You can have them all as text strings in your collection