# Power Table onDoubleClick getValueAt error

**URL:** <https://forum.inductiveautomation.com/t/power-table-ondoubleclick-getvalueat-error/33129>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 16, 2020, 5:04pm UTC](https://forum.inductiveautomation.com/t/power-table-ondoubleclick-getvalueat-error/33129 "2020-03-16T17:04:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan.bathalon1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathan.bathalon1](https://forum.inductiveautomation.com/u/jonathan.bathalon1)\
**Post date:** [March 16, 2020, 5:04pm UTC](https://forum.inductiveautomation.com/t/power-table-ondoubleclick-getvalueat-error/33129/1 "2020-03-16T17:04:58Z")

</div>

I receive this error message (in Diagnostics -\> Console) in the Designer when I double click on my power table atempting to retreive a specific colomn value.

I can’t figure out what is my error.

Thanks for your help.

12:55:46.638 [AWT-EventQueue-0] ERROR Vision.Components.AdvancedTable - Error invoking extension method.  
org.python.core.PyException: Traceback (most recent call last):  
File “”, line 15, in onDoubleClick  
TypeError: ‘instancemethod’ object is unsubscriptable

Line 15 ==\> mypk = self.data.getValueAt[rowIndex,“pk”]

Here is my entire def code:

def onDoubleClick(self, rowIndex, colIndex, colName, value, event):  
“”"  
Called when the user double-clicks on a table cell.

```
Arguments:
	self: A reference to the component that is invoking this function.
	rowIndex: Index of the row, starting at 0, relative to the underlying
	          dataset
	colIndex: Index of the column starting at 0, relative to the
	          underlying dataset
	colName: Name of the column in the underlying dataset
	value: The value at the location clicked on
	event: The MouseEvent object that caused this double-click event
"""
mypk = self.data.getValueAt[rowIndex,"pk"]  
system.gui.messageBox("my key is:" + str(mypk),"Test")
```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 16, 2020, 5:13pm UTC](https://forum.inductiveautomation.com/t/power-table-ondoubleclick-getvalueat-error/33129/2 "2020-03-16T17:13:20Z")

</div>

`getValueAt` is a function - you need to call it (using parentheses) not attempt a ‘subscript’ notation (using square brackets).

`mypk = self.data.getValueAt[rowIndex,"pk"]`  
Is asking for the `(rowIndex, "pk")` _attribute_ of the `getValueAt` _method_ of the `self.data` dataset.

The correct syntax is just:  
`mypk = self.data.getValueAt(rowIndex,"pk")`

---

<div class="post-metadata">

**Author:** ![jonathan.bathalon1](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jonathan.bathalon1](https://forum.inductiveautomation.com/u/jonathan.bathalon1)\
**Post date:** [March 16, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/power-table-ondoubleclick-getvalueat-error/33129/3 "2020-03-16T17:16:10Z")

</div>

Oh thanks you PGriffith!

It look like I was blind this morning! 🙂
