# Changing Power Table headers through scripting

**URL:** <https://forum.inductiveautomation.com/t/changing-power-table-headers-through-scripting/17710>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [April 13, 2018, 5:50pm UTC](https://forum.inductiveautomation.com/t/changing-power-table-headers-through-scripting/17710 "2018-04-13T17:50:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![automatisation](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@automatisation](https://forum.inductiveautomation.com/u/automatisation)\
**Post date:** [April 13, 2018, 5:50pm UTC](https://forum.inductiveautomation.com/t/changing-power-table-headers-through-scripting/17710/1 "2018-04-13T17:50:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [April 13, 2018, 6:34pm UTC](https://forum.inductiveautomation.com/t/changing-power-table-headers-through-scripting/17710/2 "2018-04-13T18:34:17Z")

</div>

> [@Dynamic Column Attributes Data](http://forum.inductiveautomation.com/t/dynamic-column-attributes-data/11502/7):
>
> I got it to work. [code]headers =[“name”,“dateFormat”,“editable”,“filterable”,“hidden”,“horizontalAlignment”,“label”,“numberFormat”,“prefix”,“sortable”,“suffix”,“treatAsBoolean”,“verticalAlignment”,“wrapText”] data.append([row,“MMM d, yyyy h:mm a”,“false”,“false”,“false”,"-9","","#,##0.##","",“true”,"",“false”,“0”,“false”])[/code] thanks for the help

Or

[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/109/2/working-with-power-table-extension-functions#configureHeaderStyle](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/109/2/working-with-power-table-extension-functions#configureHeaderStyle)

should get you going

---

<div class="post-metadata">

**Author:** ![automatisation](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@automatisation](https://forum.inductiveautomation.com/u/automatisation)\
**Post date:** [April 16, 2018, 2:04pm UTC](https://forum.inductiveautomation.com/t/changing-power-table-headers-through-scripting/17710/3 "2018-04-16T14:04:42Z")

</div>

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.
