# Power Table Determine Multiple Rows Selected

**URL:** <https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [September 4, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412 "2020-09-04T17:16:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 4, 2020, 5:16pm UTC](https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412/1 "2020-09-04T17:16:00Z")

</div>

Using vision, v8.0.15, I want to enable a button only if a row is selected, which is easy, but I don’t want this button enabled is multiple rows are selected. What would be the best way to accomplish this? I’m sure I could runscript, but didn’t know if there were other tricks.

---

<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:** [September 4, 2020, 5:48pm UTC](https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412/2 "2020-09-04T17:48:47Z")

</div>

You could create a custom method on the table called selectedRows() and a custom boolean property on the table named something like multipleSelected.

Put something like this in the custom method

```auto
	if len(self.getSelectedRows())>1:
		return 1
	else:
		return 0

```

Then in the configureCell extension function just call it and set the boolean property

```auto
self.multipleSelected = self.selectedRows()

```

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 4, 2020, 6:10pm UTC](https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412/3 "2020-09-04T18:10:36Z")

</div>

That doesn’t really work as it won’t update unless you select rows then commit somehow, click off, etc.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 4, 2020, 6:12pm UTC](https://forum.inductiveautomation.com/t/power-table-determine-multiple-rows-selected/38412/4 "2020-09-04T18:12:31Z")

</div>

Nevermind, putting in onMouseRelease should do the trick. Thanks for the help!
