We’ve got a vision screen featuring a data table with a fairly frequent row additions. We use the sql polling to frequently update the data in the table. From this screen, operators select rows, and then use buttons along the bottom to launch popups or modify table data. Our problem is caused when an operator selects a row, the system polls new data, and a new row is inserted at the top. The selection will remain at the same row index in the table, but this is now different row data. If the operator does not notice, they will edit the wrong row. Any ideas on a fix for this? Ideally, the selection would shift down with the update, but maybe deferring updates when rows are selected might be our only option
How is the data being queried, and does your data have a consistent column that could be indexed on?
With scripting in Vision, you can absolutely manually change the selected index; it’s just going to (potentially) be hard to hook in at the correct time.
It is a pretty standard query, select top xxxx sort by date. We have a unique guid for each line, so we should be able to find the same row after refresh. I think turning polling mode to off, then using a script on a timer object to control the table state after the update might be our best option
selectedguid = guid at selected row db.update() selected row = row where guid is selectedguid
I’ll try that out. Thanks!