Retrieve data from selected table row

Hi Yisrael. Yes, that’s what I’m doing, and it does select the correct data. I just wanted the table to scroll to the selected record, which I can’t get it to do. It always goes back to the first record, even if I scroll down hundreds of items and click on a row. The scrollTo() doesn’t seem to work.

export function tblBookList_rowSelect(event, $w) {
let rowData = event.rowData.title;
let rowIndex = event.rowIndex;

$w(“#BookData”).text = rowData; //text box on form
$w(“#tblBookList”).scrollTo(rowIndex); //table
console.log(rowData);
console.log(rowIndex);
}

Thanks for your help.