A single table refresh after 1/2 second

I have a table that uses a pipe to collect new data whenever the page is rendered.
But I want to show the new data on the rendered page, and so I would like the table to automatically refresh after 1/2 second.

I have used the AI and it suggests using
setTimeout(function() {
$(‘[ng-click=“refreshData()”]’).click();
}, 500);

This works, but keeps repeating every 1/2 second and I only want the action once.

I have tried building if else logic to detect first time and route else if not - its ignored.
I have tried using clearTimeout but this either stops the first action, or is ignored.

I am in the dark, can anyone cast any light on what I need to do, please.

Hey @mtif

Just to clarify, after a Page loads, you want to refresh a component after 1/2 second? Does that sound right?

Sorry for the delayed response Tim, I am travelling ATM

But yes. I have a table that has a value taken a from a local session variable.

I am loading and updating the new table value from the local session on page load.

But, I want the new value in the the table showing on the page…I would prefer the table only loads after the new session value has updated it. Or more likely could make do with a table reload that fires after half a second (to allow the local session value update to have happened)

I hope that makes sense