# Bidirectional Table Cell Update Binding

**URL:** <https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [October 27, 2023, 7:44pm UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118 "2023-10-27T19:44:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Dolan](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tyler\_Dolan](https://forum.inductiveautomation.com/u/Tyler_Dolan)\
**Post date:** [October 27, 2023, 7:44pm UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118/1 "2023-10-27T19:44:06Z")

</div>

I have a report screen with hundreds of formatted text fields bound to tag values, each with several target properties that determine if it should be colored red, green, etc.

I created a power table to make setting the target properties more user friendly. Is it possible to have the cell update binding of the underlying dataset be bidirectional, such that when I type into the table, the bound property is updated?

Alternatively, is there a good way to mimic this behavior in the onCellEdited function of the power table, so that I can grab the cell binding at the edited row and column and update its value via scripting?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 29, 2023, 9:19am UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118/2 "2023-10-29T09:19:43Z")

</div>

**Edit:** Interesting question. None of my ideas feel very maintainable, but I was contemplating this, and consequently, I had it open in a tab when I was answering another question. I inadvertently posted my answer to that question here.

...even though I don't have the correct answer to this question, at least this post gets a bump back to the top.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 5, 2023, 9:46am UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118/3 "2023-11-05T09:46:22Z")

</div>

I messed around with various ways to do this, and the simplest thing I found that worked was to add a dataset custom property to the table called `tagSources`. Then row for row, column for column, store the tag paths that are used in the cell update bindings. Then, this one line script in the `onCellEdited` extension function will update the tags anytime an edit is made:

```auto
#def onCellEdited(self, rowIndex, colIndex, [...], newValue):
	system.tag.writeBlocking(self.tagSources.getValueAt(rowIndex, colIndex), newValue)

```

---

<div class="post-metadata">

**Author:** ![Tyler\_Dolan](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@Tyler\_Dolan](https://forum.inductiveautomation.com/u/Tyler_Dolan)\
**Post date:** [November 13, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118/4 "2023-11-13T17:22:25Z")

</div>

> Then row for row, column for column, store the tag paths that are used in the cell update bindings.

You had to do this manually right?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 14, 2023, 12:58am UTC](https://forum.inductiveautomation.com/t/bidirectional-table-cell-update-binding/81118/5 "2023-11-14T00:58:07Z")

</div>

Correct
