I have a collection, where the record is found via a 'name match'. The correct record is found and displayed. All is good. But, I would like to update the record with with new data for some fields. I see there are various ways to do this. I figured the easiest was to update the record using the _id. But, I haven't been able to get it! What am I doing wrong!!!!???
$w("#searchButton").onClick ((event) =>{ wixData.query("HLAMemberDB") .contains("name",$w('#searchBox').value) .find() .then(result => { console.log("searchButton onClick event", result); $w("#table1").rows = result.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); <------ THIS SAYS "undefined" console.log(rowData.lakeAddress); Everything else is good. console.log(rowData.parcelNumber); console.log(rowData.name); console.log(rowData.mailAddress); console.log(rowData.city); console.log(rowData.state); console.log(rowData.zip);
How do looks like the console-log-output for your row-data?
Do you have a screenshot?