After .onRowSelect, the record's id is 'undefined'

@karenmpiekarski have you tried using options to suppress auth see if this helps

let options = {
  "suppressAuth": true,
  "suppressHooks": false
};

However I think the issue might be in the return onrowselect; maybe adding the below to the top of the data query return:


EDIT: refactored code:

wixData.query("HLAMemberDB")         
 .contains("name", $w('#searchBox').value)         
 .find(options)         
 .then(result => {             
  
    let items = result.items;
    items.forEach( (item)=>{ item.row_id = item._id; }); <- copy _id to row_id;
  
     console.log("searchButton onClick event", {result, items});             
     $w("#table1").rows = items;             
     $w("#table1").expand();             
     $w("#table1").show('fade');        
  });


 $w("#table1").onRowSelect(async(row_choosen) => {
    let rowData = await row_choosen.rowData; 
    let rowIndex = await row_choosen.rowIndex;
        console.log("rowData is ",rowData); 
        console.log("RowIndex is ",rowIndex); 
 
        console.log("_id is ",rowData._id);
        console.log("row_id is ",rowData.row_id);
        console.log(rowData.lakeAddress);      
        console.log(rowData.parcelNumber);
        console.log(rowData.name);
        console.log(rowData.mailAddress);
        console.log(rowData.city);
        console.log(rowData.state);
        console.log(rowData.zip);


      });

of course, this isn’t tested so there may be some syntax errors etc;