# Select next cell below in column of Power Table after edit

**URL:** <https://forum.inductiveautomation.com/t/select-next-cell-below-in-column-of-power-table-after-edit/60102>\
**Category:** Ignition\
**Created:** [May 27, 2022, 2:33am UTC](https://forum.inductiveautomation.com/t/select-next-cell-below-in-column-of-power-table-after-edit/60102 "2022-05-27T02:33:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VVVVVV](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@VVVVVV](https://forum.inductiveautomation.com/u/VVVVVV)\
**Post date:** [May 27, 2022, 2:33am UTC](https://forum.inductiveautomation.com/t/select-next-cell-below-in-column-of-power-table-after-edit/60102/1 "2022-05-27T02:33:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Brandon\_Peterson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brandon_peterson/32/32960_2.png) [@Brandon\_Peterson](https://forum.inductiveautomation.com/u/Brandon_Peterson)\
**Post date:** [May 27, 2022, 7:21pm UTC](https://forum.inductiveautomation.com/t/select-next-cell-below-in-column-of-power-table-after-edit/60102/2 "2022-05-27T19:21:35Z")

</div>

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:

1. Get the row number of the underlying dataset (`.data`) for the currently selected cell
2. Figure out which row in the `viewDataset` this is
3. Add 1 to get the next visual row number
4. Get the row number of the underlying dataset for that row
5. 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)](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Power+Table)

---

<div class="post-metadata">

**Author:** ![VVVVVV](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@VVVVVV](https://forum.inductiveautomation.com/u/VVVVVV)\
**Post date:** [May 31, 2022, 8:19pm UTC](https://forum.inductiveautomation.com/t/select-next-cell-below-in-column-of-power-table-after-edit/60102/3 "2022-05-31T20:19:29Z")

</div>

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.
