# Power Table hidden column value

**URL:** <https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451>\
**Category:** General Discussion\
**Created:** [December 9, 2016, 9:37pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451 "2016-12-09T21:37:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 9, 2016, 9:37pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/1 "2016-12-09T21:37:14Z")

</div>

How can i get the value of a hidden column when row selected? Hidden columns do not appear to have a column index in the Power Table, if they do they are not in order and the table.getValueAt(row, col) requires an index not a column name.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [December 10, 2016, 3:58pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/2 "2016-12-10T15:58:12Z")

</div>

Expression:

```auto
try({Root Container.Power Table.data}[{Root Container.Power Table.selectedRow},2],'None Selected')
```

Scripting

```auto
#Column Index 2 is hidden in the Table.
Table1 = event.source.parent.getComponent('Power Table')
try:
	HiddenColumn = str(Table1.data.getValueAt(Table1.selectedRow,2))
	event.source.parent.getComponent('Text Field 1').text=HiddenColumn
except:
	event.source.parent.getComponent('Text Field 1').text="No Row Selected"
```

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 10, 2016, 6:16pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/3 "2016-12-10T18:16:16Z")

</div>

Hi Jerry,

Try using table.data.getValueAt, instead of table.getValueAt

Best,

---

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 10, 2016, 9:44pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/4 "2016-12-10T21:44:42Z")

</div>

nmudge, i tried table.data but i get “object has no attribute ‘data’”. This is a Power Table.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 11, 2016, 3:40pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/5 "2016-12-11T15:40:41Z")

</div>

Hi Jerry,

That should not happen. Can you please show the full Python script?

Thanks,

---

<div class="post-metadata">

**Author:** ![jerry101](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jerry101](https://forum.inductiveautomation.com/u/jerry101)\
**Post date:** [December 11, 2016, 5:00pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/6 "2016-12-11T17:00:24Z")

</div>

I got it to work but this is the code that I was using that did not work with ‘data’.

Inside the OnDoubleClick event:

tried to get the table several ways  
table = event.source  
and  
table = event.source.parent.getComponent(‘tableName’)

param = table.getValueAt(rowIndex, 1)  
and tried  
param = table.data.getValueAt(rowIndex, 1) (this gave me the data error)

What did work was simply using the ‘self’ attribute.

param = self.data.getValueAt(rowIndex, “ColumnName”)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 11, 2016, 5:54pm UTC](https://forum.inductiveautomation.com/t/power-table-hidden-column-value/12451/7 "2016-12-11T17:54:14Z")

</div>

Hi Jerry,

I understand. In the onDoubleClick extension function self and event.source are different objects. self is the table. event.source is an object created from an inner class of the table.

Best,
