# Change cell focus on a perspective table

**URL:** <https://forum.inductiveautomation.com/t/change-cell-focus-on-a-perspective-table/99936>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 17, 2024, 3:57pm UTC](https://forum.inductiveautomation.com/t/change-cell-focus-on-a-perspective-table/99936 "2024-12-17T15:57:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.hatcher](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@james.hatcher](https://forum.inductiveautomation.com/u/james.hatcher)\
**Post date:** [December 17, 2024, 3:57pm UTC](https://forum.inductiveautomation.com/t/change-cell-focus-on-a-perspective-table/99936/1 "2024-12-17T15:57:26Z")

</div>

After I input a new value into a cell on a perspective table is it possible to move down a cell and be able to type into that newly selected cell?

The code below seems to move the focus down one cell but not in such a way that i can begin typing.

OnEditCellCommit

def runAction(self, event):

```
# Step 1: Update the value in the current cell
valueToSet = event.value
self.props.data[event.row]["Value"]["value"] = valueToSet

# Step 2: Increment the selected row
newRow = event.row + 1 # Increment row index

# Check bounds to avoid errors
if newRow < len(self.props.data):
    self.props.selection.selectedRow = newRow # Update row selection
    
    # Step 3: Set editingCell to the next cell
    self.props.editingCell = {
        "row": str(newRow), # Target next row (string if required)
        "column": "Value" # Target same column name
    }
self.focus() 

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/444a244b2ffbca1b840445844ca28d6b32dc030d.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 18, 2024, 10:43am UTC](https://forum.inductiveautomation.com/t/change-cell-focus-on-a-perspective-table/99936/2 "2024-12-18T10:43:57Z")

</div>

Related questions:

> [@Perspective Table, Jump to next editable Cell](https://forum.inductiveautomation.com/t/perspective-table-jump-to-next-editable-cell/77193/5):
>
> You won't be able to get this functionality with the table component. You can however make your own 'table' with a custom view for a row of data (flex repeater with text fields) and a flex repeater of your row view. You can then use .focus() on the text fields to move your cursor though the "table".

> [@Excel-like cell behavior in a table](https://forum.inductiveautomation.com/t/excel-like-cell-behavior-in-a-table/79090):
>
> Hello, I'm using Ignition version 8.1.26 and I'd like to have Excel-like cell behavior in my table for Tab and Enter keypresses. I thought I could script this with an onKeyPress event but I'm not having any luck. Here is what I have. I'm really new to python so I'm sure my code is really bad. def runAction(self, event): # Get the currently selected cell coordinates #I don't think this part is working. selectedRow = self.getSibling('Table1').props.selection.selectedRow print(selectedRow)…
