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.
Now, two issues am facing:
Even though am saving logged-in user’s email in ‘Participants’ dataset, but it shows ‘Reference is broken’ in database, which needs to be set manually.
But how can I show all SPOC details from ‘Profile’ primary dataset and corresponding details of participants registered from ‘Participants’ referenced dataset?
Hi,
If you wish to insert an item (one row of data in the database collection ) with a referenced field in it, you need to make sure you are adding the entire object of the item.
For example:
If i understand you correctly use can use wixData.query(“dbname”).include method to get all information regarding that participant.
Feel free to paste your code here.