Changing Power Table headers through scripting

Dear IA,
I am looking for a way to modify the headers of a Power Table through scripting without changing the column name. Just like I would do in the Table Customizer, but with Jython script.

How can I do that?


should get you going

Dear Ethomason,
I found something similar online, but I dont think it can be applied to my case. Here`s why:

I have a SQL query for a PowerTable which gets all the columns from the SQL table. I want to display only the last 8 columns from that PowerTable. When I checked the “columnAttributesData” property dataset, all the rows describing the columns properties were in a random order. So I don’t know if remaning the column is going to have an effect on the order of the “columnAttributesData” property dataset.

I might give a try at renaming the column with hope that it’s going to keep the same random order in the Attributes properties dataset.