Stores data in a table even when it isn’t visible

Hello!
I’ve used a ui-table node to display incoming data from my Gensets. Data are only display when the table is active. When I switch to another tab, the data previously filled up in the table will disappeared.
I will like to store data in the background (when the table is invisible) and then load them to the table when it’s active (visible).
Please any help on this I’ll gladly appreciate.

You could store the data in a context variable then use the UI control node to repopulate the table upon switching pages.

Thank you for your response.
I've used the context variable as you suggested, but the values keeps on overriding in the context file in my setting.js file. I want new data to be appended to the file and not overrides the existing data.
Any help....

Probably overkill for this, but you can use a database such as SQLite.

The storage of the data is then handled outside of Node-red and the dashboard table populated from an SQL query triggered by an insert/update.

then update it, dont overwrite it! :person_shrugging:

You would have to share a flow or code first. (dont include dashboard nodes, dont include nodes that access things external to node-red since we wont have access to them - basically, use simulation data from injects/functions/templates)

If you are on dashboard 2.0, you can use the @omrid01/node-red-dashboard-2-table-tabulator table node, which maintains a live image of the table configuration, data & dynamic styling in the Node-red data store, and populates the table upon opening/refreshing the dashboard clients.

Note, however, that Node-red does not persist this data store, so once you restart the Node-red server process it is lost.

Thank you. I've used the sqlite which is pretty good. I'm able to read data from the sqlite database and display them on the dashboard table upon refresh(ui button).
The issue is when I refresh my table, new rows and columns will be created in the table with the same data as old ones.
I will like to add only updated data or new data.
Any help....

Before sending the SQL data to the table send an empty array. This will clear the table.

Instead of keeping the table and appending new rows it will redraw the whole table

I've use a change node to send an empty array into the table.
When I send the empty array, it creates an empty row below rather than clear the entire table.
Here below is my code

{
    "command": "updateOrAddRow",
    "arguments": []
}

And here are the corresponding images from my table ui


After sending the clear command, I got this

An additional row is created below...

I just replaced the updateOrAddRow command with replaceData command and it works.
Thank you once more...