# Copy some columns of a selected row from a power table to another

**URL:** <https://forum.inductiveautomation.com/t/copy-some-columns-of-a-selected-row-from-a-power-table-to-another/115146>\
**Category:** Ignition\
**Created:** [April 17, 2026, 7:06pm UTC](https://forum.inductiveautomation.com/t/copy-some-columns-of-a-selected-row-from-a-power-table-to-another/115146 "2026-04-17T19:06:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rigoberto.reyes](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@rigoberto.reyes](https://forum.inductiveautomation.com/u/rigoberto.reyes)\
**Post date:** [April 17, 2026, 7:06pm UTC](https://forum.inductiveautomation.com/t/copy-some-columns-of-a-selected-row-from-a-power-table-to-another/115146/1 "2026-04-17T19:06:55Z")

</div>

Hi.

I´m trying to copy some columns of a selected row from a power table to another trough a button with next script:

```python
# 1. Get references to the tables
sourceTable = event.source.parent.getComponent('QueryPowerTable')
destTable = event.source.parent.getComponent('PowerTable')

# 2. Get the selected row index
selectedRowData = sourceTable.selectedRow
print selectedRowData

if selectedRowData != -1:

    columnsToCopy = ['MachineID']
    filteredData = system.dataset.filterColumns(selectedRowData, columnsToCopy)
    
    # 4. Append to destination table
    newDestData = system.dataset.appendDataset(destTable.data, filteredData)
    destTable.data = newDestData
else:
    system.gui.messageBox("Please select a row first.")

```

Howerver, next error message appears:

'File "event:actionPerformed", line 16, in TypeError: filterColumns(): 1st arg can't be coerced to com.inductiveautomation.ignition.common.Dataset'

line 16... **filteredData = system.dataset.filterColumns(selectedRowData, columnsToCopy)**

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 17, 2026, 7:09pm UTC](https://forum.inductiveautomation.com/t/copy-some-columns-of-a-selected-row-from-a-power-table-to-another/115146/2 "2026-04-17T19:09:56Z")

</div>

A Power Table's `selectedRow` property is an integer, representing the row offset in the table's data. You are trying to feed it to `system.dataset.filterColumns()`, which expects a dataset, not an integer.
