Dataset availablilty

Hello Everyone

I’ve been struggling to understand how long a dataset is available in a perspective view. This case a popup. I’m populating a pydataset with a named query on view open in the onStartup event that in turn populates some drop downs.
The dataset is a hierarchal representation of available downtime events for a cell. Ideally I would like to keep the dataset so the operator can change downtime events without having to run the named query again. The dataset is only important while the popup is open.

Thank you

Assign it to a custom property of the view you’re using for the popup.

Variables you declare in a script only exist in that script scope, which means cease to exist when that script ends. If you want to make it available somewhere else, you need to do it explicitly: save it to a tag, to a property, put it in a database…
In your case, if the dataset’s scope needs to be your popup, then a custom property on your popup is where you should save it.

1 Like

Thanks, I’ll try that