Button to change Power Table

I have multiple buttons and I want it top change the data in a Power Table. My approach was to do the following scripting for each button but nothing is appearing in my power table.

System.db.runQuery() returns a PyDataSet type. You will need to convert to a basic dataset to use with the table

event.source.parent.getComponent('Power Table 1').data = system.dataset.toDataSet(results)

Note: You only need to do that unwrapping in 7.9. In 8.1 PyDatasets are Datasets.

1 Like

Still nothing is being displayed in my power table.