# How to rename Powertable columns?

**URL:** <https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665>\
**Category:** Ignition\
**Tags:** ignition80, scripting, vision\
**Created:** [August 12, 2020, 9:46pm UTC](https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665 "2020-08-12T21:46:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmalec](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@dmalec](https://forum.inductiveautomation.com/u/dmalec)\
**Post date:** [August 12, 2020, 9:46pm UTC](https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665/1 "2020-08-12T21:46:41Z")

</div>

**Trying to figure out how to have dynamic column titles in a power table:**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/b/1bd8720bcdb365c4807621338b0d8011873154ca.png)

**Unfortunately cant have tags in the column name, or indirect tag reference**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/77d61f1c9648372e90c8f218391de6192f129ed3.png)

**Some of the scripting ive been trying:**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7f03adc8d0982d563c77ff197dcf22c65d9c9d87.png)  
with the above picture, i was hoping the columnRename would work but i cant seem to call it.  
(documentation -\>) [columnRename - Ignition User Manual 8.0 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC80/columnRename)

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 12, 2020, 10:46pm UTC](https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665/2 "2020-08-12T22:46:04Z")

</div>

~~event.source.data = system.dataset.columnRename(event.source.data, ‘zCol1’, ‘zCol2’)~~

~~Does that work?~~

No it does not

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [August 12, 2020, 11:00pm UTC](https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665/3 "2020-08-12T23:00:38Z")

</div>

New plan.

Use a custom property with type dataset. Bind this however you want to get the data (looks like the tag historian based on your pictures)

Bind the table dataset using this expression. Replace {Root Container.Power Table.rawData} with the correct path to the custom property. Replace my column names with better ones, making sure the number of provided names match the number of columns.

```auto
try(
	columnRename({Root Container.Power Table.rawData},'zCol1','zCol2','zCol3'),
	{Root Container.Power Table.rawData}
)

```

---

<div class="post-metadata">

**Author:** ![dmalec](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@dmalec](https://forum.inductiveautomation.com/u/dmalec)\
**Post date:** [August 13, 2020, 2:33pm UTC](https://forum.inductiveautomation.com/t/how-to-rename-powertable-columns/37665/4 "2020-08-13T14:33:02Z")

</div>

Worked perfectly, thanks!
