use data from openlightbox to populate dataset

The ID that Corvid is expecting in the queryReferenced query is the collection’s built-in ID field called “_id”. Here’s how you get it to show in the collection editor:


TeamsId is the _id value of say the first record in teams.


  wixData.queryReferenced("teams", TeamsId, "child_id")
  .then( (results) => {
    console.log(results);
  } )
  .catch( (err) => {
    let errorMsg = err;
  } );

It returns an array like this:


In your query, the records returned would have the children data child_id, teams-2, players_first_name, players_last_name, etc.