Hi,
You need to write the table’s onClick inside the dataset’s onReady, the on ready function runs only one time when the item is ready, and that is the reason the code works only on the first time.
The solution is to change the order of the function, make the click available only when the dataset is ready.
The code should look like this:
export function dataset2_ready() {
$w('#table1').onClick((event, $w) => {
let newValue1 = $w('#dataset2').getCurrentItem()['field'];
wixLocation.to('https://myprefix.wixsite.com/sitename/"FIELD DYNAMIC PAGE"/' + newValue1);
});
}