# Perspective Table Edit Dataset

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 10, 2022, 11:24pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377 "2022-11-10T23:24:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [November 10, 2022, 11:24pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377/1 "2022-11-10T23:24:17Z")

</div>

I'm trying to edit values of a dataset by converting it into a py dataset but I'm not having any luck.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e113feb9383862c9d3aae5a8311396fa0023a9c.png)  
When I submit an edit to a cell I get this error.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/d/1d468fe8920280c3cb234c4dd137c7a1ad57fa36.png)  
Is there a better way to edit a dataset in a table?

Thanks!

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 10, 2022, 11:31pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377/2 "2022-11-10T23:31:50Z")

</div>

1. Never post code different than the exact code which encountered the issue. The line number referenced in your failure message is a comment in the screenshot.
2. Never post code as a screenshot - give us the code in a pre-formatted snippet so that we don't have to write it ourselves in order to help you troubleshoot.
3. Yes, there's a better way: [system.dataset.setValue - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.dataset.setValue)

So your code would look like this:

```auto
self.props.data = system.dataset.setValue(self.props.data, event.rowIndex, event.column, event.value)

```

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [November 10, 2022, 11:35pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377/3 "2022-11-10T23:35:10Z")

</div>

FYI the error in your screenshot was likely caused by `event.column` in line 7 of your code screenshot. You'll notice under arguments that `event.column` can be a `str` or string value. The column index value for your pyDataSet must be an integer.

---

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [November 10, 2022, 11:41pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377/5 "2022-11-10T23:41:48Z")

</div>

That's just the function I needed! It's working now.

Sorry 😬! I went back and added those 4 comments and forgot to re screenshot the error. I'll keep these in mind for next time!

Thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![Isaac\_Hodgkins](https://avatars.discourse-cdn.com/v4/letter/i/59ef9b/32.png) [@Isaac\_Hodgkins](https://forum.inductiveautomation.com/u/Isaac_Hodgkins)\
**Post date:** [November 10, 2022, 11:42pm UTC](https://forum.inductiveautomation.com/t/perspective-table-edit-dataset/66377/6 "2022-11-10T23:42:34Z")

</div>

Ahhh, that makes sense. Thanks for pointing that out!
