# Power table update input text box

**URL:** <https://forum.inductiveautomation.com/t/power-table-update-input-text-box/105114>\
**Category:** Ignition\
**Tags:** scripting, database, vision\
**Created:** [April 15, 2025, 2:14pm UTC](https://forum.inductiveautomation.com/t/power-table-update-input-text-box/105114 "2025-04-15T14:14:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![garrett.crow02](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@garrett.crow02](https://forum.inductiveautomation.com/u/garrett.crow02)\
**Post date:** [April 15, 2025, 2:14pm UTC](https://forum.inductiveautomation.com/t/power-table-update-input-text-box/105114/1 "2025-04-15T14:14:12Z")

</div>

I have a data text box entry that writes to a power table and updates when you click on a row. I am trying to get the text box not to update when no rows are selected. The text box also updates a little fast and makes it hard to update the table when entering different info

`if ({Root Container.Company_Table.selectedRow}!= -1) try({Root Container.Company_Table.data}[{Root Container.Company_Table.selectedRow}, "Allowed"], " ")`

---

<div class="post-metadata">

**Author:** ![garrett.crow02](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@garrett.crow02](https://forum.inductiveautomation.com/u/garrett.crow02)\
**Post date:** [April 15, 2025, 2:18pm UTC](https://forum.inductiveautomation.com/t/power-table-update-input-text-box/105114/2 "2025-04-15T14:18:58Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f864484de98abd30b1cc164c0e587157be141eb.png)  
Current error

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 17, 2025, 10:34am UTC](https://forum.inductiveautomation.com/t/power-table-update-input-text-box/105114/3 "2025-04-17T10:34:23Z")

</div>

The first part of the if statement is malformed. Try this (note that I tend to place the different portions on different lines in an attempt to make it more readable):

```python
if({Root Container.Company_Table.selectedRow}!= -1,
   {Root Container.Company_Table.data}[{Root Container.Company_Table.selectedRow}, "Allowed"],
   " "
  )

```
