# Get value of specfic cell in a table?

**URL:** <https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715>\
**Category:** Ignition\
**Created:** [July 11, 2014, 3:01pm UTC](https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715 "2014-07-11T15:01:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [July 11, 2014, 3:01pm UTC](https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715/1 "2014-07-11T15:01:54Z")

</div>

I have a table which it’s dataset is bound to an SQL table. I’ve created a button to insert data into the SQL table, and as a result the table in Ignition reflects the newly inserted data.

Now, I need to delete the a row of data from the SQL table.

I’m stuck on the scripting required to pull out the UUID of this row entry. The UUID is located in a specific column in the row of data I wish to delete.

My code is below, line 10 is my issue. I’m not sure what the syntax should be. Can anyone help?

```auto
1 # Delete Entry
2
3 # Capture row index
4 row = event.source.parent.parent.getComponent('Table').selectedRow
5
6 # Define UUID column index
7 uuidCol = 11
8
9 # Capture data in the specified column
10 UUID = event.source.data.getValueAt(row, uuidCol)
11
12 # Define SQL Delete Querey
13query = "DELETE FROM table WHERE UUID = %s)" %(UUID)
14database = "TestDB"

# Run SQL query
system.db.runUpdateQuery(query,database)
```

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [July 11, 2014, 3:16pm UTC](https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715/2 "2014-07-11T15:16:31Z")

</div>

Try this:

```auto
tbl = event.source.parent.parent.getComponent('Table')
UUID = system.dataset.toPyDataSet(tbl.data)[row][uuidCol]
```

---

<div class="post-metadata">

**Author:** ![SeanT](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SeanT](https://forum.inductiveautomation.com/u/SeanT)\
**Post date:** [July 11, 2014, 3:20pm UTC](https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715/3 "2014-07-11T15:20:25Z")

</div>

You have to get the dataset from the table object the same way you did for the selected row on line 4, just change .selectedRow to .data and use your .getValueAt on the dataset.

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [July 11, 2014, 6:53pm UTC](https://forum.inductiveautomation.com/t/get-value-of-specfic-cell-in-a-table/8715/4 "2014-07-11T18:53:19Z")

</div>

Thanks got it working!
