Auto-refresh only a table every 30 sec

Up to now, all the similar discussions are not what I need. First of all, I gotta say I’m new to coding and I thought the logic was in my mind to execute the code, though not working at all.

I just want to refresh exclusively the table connected to one of my datasets every 30 secs or less automatically, with no button whatsoever. The idea is to keep the data with a < 30-sec delay. Here’s the code I have:

$w . onReady ( function () {
$w ( “#table01” ). refresh (
)});

setInterval (() => { 
$w ( '#table01' ). refresh (); 
console . log ( 'Done refreshing Dataset' ); 

}, 30000 );

What am I doing wrong? Maybe, everything! :disappointed:

@gleonevb Try creating a separate function for setInterval to call:

$w.onReady(function () {
    setInterval(RefreshTable,30000);
});

export function RefreshTable(){
  $w('#table01').refresh();
}

Thanks, Anthony. Works perfectly! Not being funny, it’s working better than expected. I really appreciate your time and answer. My best wishes to you. Good Luck!