How to refresh a vision table?

Hi There,

I'm having a weird time trying to update a regular old table in vision. It's a very simple table with 2 columns. The data property of the table is linked to a tag that is an array. I can add something to the array using table.data.setValueAt . This works just fine but the table doesn't update unless I click on it. So I added a line after my setValueAt for system.db.refresh. Now this does update the table immediately but it also throws an error:

AttributeError: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'db'

What stupid thing am I doing wrong here?

Thanks in advance!

Where is your script being ran from? Is it a component [like a button]? If so, what event handler are you using? Can you provide any or all of the script?

In your script add a system.db.refresh().

This is the reported problem.

This is the problem. Don't manipulate datasets in place. That won't generate change events anywhere in the system, and won't write back to the tag (except in odd cases in gateway scope). Use system.dataset.setValueAt() and use the new dataset it returns in a write to the tag.

(Same is true for documents and arrays. Do not manipulate in place.)

Thank you that worked perfectly!

I appreciate everyone's responses