use data from openlightbox to populate dataset

I read the document and made some small modifications. Still getting error: Item [Wwho-email@gmail.com] does not exist in collection [teams]. Tried it for other child_id’s that are referenced and same thing.

  1. Children is going directly to teams

  2. code below
    let dataObj = wixWindow.lightbox.getContext();
    //console.log(dataObj.child_id);
    wixData.queryReferenced(“teams”, dataObj.child_id, “Children”)
    .then( (results) => {
    if (results.items.length > 0) {
    let firstItem = results.items[0]; //see item below
    console.log((“woo hoo found a record”))
    } else {
    // handle case where no matching items found
    console.log(“oh no, no recs found!!!”)
    }
    } )
    . catch ( (error) => {
    let errorMsg = error.message;
    let code = error.code;
    } );

3)screen shots attached. As you can see I the reference seem correct.