There is a oncelledited script updating the database when a value is edited, but I have to click the next value in the column to edit with my mouse. The data being updated is displayed by time. I already use the indexid and column name of the table as arguments in the update script. How can I use index-1 after pressing enter on my keyboard and select the next cell below for entry without using a mouse? Are there properties of a table that can be checked to see if the time column is filtered asc or desc to change it to indexid +1?
Take a look at the viewDataset
property. I think it has what you’re looking for. That dataset is a copy of what data is currently displayed, and in what order.
To get the next row in the view, you need to do a couple things:
- Get the row number of the underlying dataset (
.data
) for the currently selected cell - Figure out which row in the
viewDataset
this is - Add 1 to get the next visual row number
- Get the row number of the underlying dataset for that row
- Set that row number as the new
.selectedRow
.
Pro-Tip
Add a rowNum
column to your dataset that corresponds to the row number in data
. That way you can use it to switch between viewDataset
rows and data
rows.
Vision - Power Table - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)
I accidentally realized that the power table has functionality for this today. When you initially click in a cell to edit it, it highlights the text. After you hit enter to submit, it puts a box around the cell, if you hit enter again, it will go down to the next row in the column, where you can start typing (without the entry highlighted) and then when you hit enter again, it goes to the next cell below in the column.