How display Master-Detail info using with reference field?

Hello,

I have two datasets ‘Profile’ and ‘Participants’, wherein ‘Profile’ dataset maintain user profile of SPOCs (Single Point Of Contact) as explained in Velo Tutorial: Building Your Own Members Area | Help Center | Wix.com. And any SPOC loged-in can register and add participants for an event in ‘Participants’ dataset .

Profile
name
spocEmail (primary field)
chapter
phone

Participants
name
email
chapter
spocEmail (referenced field)

While entering data in ‘Participants’ dataset, am also saving logged-in user’s email in a field and has made it referenced field. So, ‘Profile’ dataset is my primary dataset with spocEmail field as primary field and ‘Participants’ dataset is referenced dataset with sopcEmail as referenced field.

It works fine in repeater for showing SINGLE SPOC from ‘Profile’ primary dataset and details of participants he registered/entered from ‘Participants’ referenced dataset (after I update referenced field manually). Precisely, it shows all participants and corresponding SPOC details using referenced filed.
(I used CMS: About Displaying Content from Multiple Database Collections Using Reference Fields | Help Center | Wix.com)

But how can I show ALL SPOC details from ‘Profile’ primary dataset and corresponding details of participants registered from ‘Participants’ referenced dataset?

I need report like:

SPOC1 Participant1
Participant2
Participant3

SPOC2 Participant1
Participant2
Participant3

SPOC3 Participant1
Participant2
Participant3

Please guide

Any update on this problem statement please?

Any update on this please?

Hey,

You should be able to get what you are looking for by using the queryReferenced() function from the wix-data API.

Hope this helps!

Dara | Corvid Team