Refresh Data block in DVL

I’m curious about this block:


The documentation states: “Refresh the Data Viewer List to sync with the Data Source.”

As I understand it, that block updates the displayed information in a Data Viewer List (DVL) after a change has been made to the data source.

A change could be: (1) Create a row, (2) Update a value, (3) Delete a row

Wouldn’t it make sense to have the refresh function automatically be part of #1, #2, and #3 above? That way, any time a change is made to the data source, the DVL updates to sync with the new state of the data source.

My real question, then, is: are there times when you do not want the DVL to update automatically? When you would make a change to the data source and intentionally not refresh the DVL display?

The one thing I can think of is speed. I imagine if you were creating/updating/delete a bunch of rows, it’s probably much faster to do so without refreshing after each change and then just refresh the DVL once after all changes have been made.

If that’s the only example, I’d think it makes sense to have a property or switch of some sort on the block that toggles refreshing for that individual block.

In Scratch, for example, there is a “Run without screen refresh” checkbox you can select (or not) when a function block is added to the screen:

Speed will always be the main reason. There are times you might delete something locally and make a web call or two. I would say there’s lot’s of reason why you wouldn’t want to refresh the viewer until you are done. You just don’t want to waste the I/O until you need to.

It’s also helpful when you leave a DVL and go to another screen to do more work, then come back and call a refresh if you modified the data in another screen.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.