# Select All Button - Power Table

**URL:** <https://forum.inductiveautomation.com/t/select-all-button-power-table/15402>\
**Category:** Ignition\
**Created:** [September 19, 2017, 11:41pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402 "2017-09-19T23:41:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [September 19, 2017, 11:41pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/1 "2017-09-19T23:41:57Z")

</div>

I have a power table that I would like to create a “Select All” button for.

I have done this with the plain Table component with the following scripting:

table = event.source.parent.getComponent(‘Table’)  
rows = table.getRowsInViewOrder()  
table.setRowSelectionInterval(0, len(rows) - 1)

However, I do not see a getRowsInViewOrder or setRowSelectionInterval in the PowerTable documentation.

Is there a way to set the selected rows in a Power Table component with Scripting?

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [September 20, 2017, 7:47am UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/2 "2017-09-20T07:47:37Z")

</div>

Not via the documented functions, but it is possible if you go into the Java backend.

See [Set multiple row selection on powertable](http://forum.inductiveautomation.com/t/set-multiple-row-selection-on-powertable/14375)

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [September 20, 2017, 1:49pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/3 "2017-09-20T13:49:23Z")

</div>

Thank you! I tried to search the forum first, but didn’t see your post.

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [September 20, 2017, 4:47pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/4 "2017-09-20T16:47:19Z")

</div>

I found a more elegant solution:

table = event.source.parent.getComponent(‘Table’)  
jide\_table = table.getTable()  
jide\_table.selectAll()

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [December 20, 2017, 5:47pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/5 "2017-12-20T17:47:55Z")

</div>

I might also add that

```auto
table = event.source.parent.getComponent('Table')
jide_table = table.getTable()
jide_table.clearSelection()

```

will clear the selection.

---

<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 23, 2020, 10:15pm UTC](https://forum.inductiveautomation.com/t/select-all-button-power-table/15402/6 "2020-03-23T22:15:26Z")

</div>

A post was split to a new topic: [Select All Perspective Table](https://forum.inductiveautomation.com/t/select-all-perspective-table/33341)
