# Perspective table edit - retrieve the "before edit" value in script

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-edit-retrieve-the-before-edit-value-in-script/25223>\
**Category:** Ignition Early Access\
**Created:** [May 22, 2019, 11:36am UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-retrieve-the-before-edit-value-in-script/25223 "2019-05-22T11:36:36Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [May 22, 2019, 11:36am UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-retrieve-the-before-edit-value-in-script/25223/1 "2019-05-22T11:36:36Z")

</div>

The table’s _onEditCellCommit_ event returns three values; the table row, column and the edited value. I want to log any changes so I need to read the _oldValue_ but that’s not a property of the table edit event.

```auto
def runAction(self, event):
    ...
    # These three event values can be obtained.
	r = event['row']
	c = event['column']
	v = event['value']

```

My table binding is JSON format (as advised in [Perspective table edit example, please](http://forum.inductiveautomation.com/t/perspective-table-edit-example-please/25050)) so I can get any particular field using the syntax `id = self.props.data[r].id`.

What is the right way to get the oldValue from the table before it is updated? How do I relplace `id` in `self.props.data[r].id` with the selected column name, `event['column']`?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2019, 4:00pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-retrieve-the-before-edit-value-in-script/25223/2 "2019-05-22T16:00:03Z")

</div>

Try jython’s built-in getattr() function, like so:

```auto
oldv = getattr(self.props.data[r], c)

```

---

<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:** [May 23, 2019, 10:29am UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-retrieve-the-before-edit-value-in-script/25223/3 "2019-05-23T10:29:05Z")

</div>

Perfect.

Thanks, Phil.
