Perspective: onStartup script - reset Table data when a view is loaded

8.1.4-rc1 (b2021031812)

Hi, I would like to erase the content of a table at each refresh of its parent view.
I created this onStartup Event Script on the Table itself, but the data don’t seem to reset on startup.[]

Any idea what I’m missing here ?

Nothing’s loaded yet when the startup event fires. It’s a bit of a misnomer and very confusing! Youll need to run it on an on change event on one of your custom props

@nminchin I created this custom prop on my view, and attached a ‘change event’ to it
But I still don’t get the table data reset that I’m expected.

Also about the startup event, is it possible to reload all view’s components upon view reload ?

I didn’t mention it, but it does need to be bound to something. Usually I have params and I bind one of these to the custom prop (you can’t use a param’s change event for the same reason you can’t use startup)
I actually still haven’t worked out the best way to do what you’re trying to do reliably… You might need to use a custom prop on the component itself :confused: I really wish there was a good way to execute a script at startup once everything has been loaded. @PGriffith, any suggestions?

@PGriffith any idea how I can use View Startup Event to trigger some scripts ?
(for instance clearing up a table when the view is refreshed in the web browser)