# Create a valid header for a perspective table

**URL:** <https://forum.inductiveautomation.com/t/create-a-valid-header-for-a-perspective-table/53505>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [November 27, 2021, 3:25pm UTC](https://forum.inductiveautomation.com/t/create-a-valid-header-for-a-perspective-table/53505 "2021-11-27T15:25:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [November 27, 2021, 3:25pm UTC](https://forum.inductiveautomation.com/t/create-a-valid-header-for-a-perspective-table/53505/1 "2021-11-27T15:25:26Z")

</div>

Hi everyone, I am trying to create data for my perspective table using the script below.

```auto
def runAction(self):
	data = []
	data.append({'Site Name':'Site A', 'Location':'Some where'})
	self.props.data = data

```

However, when I looked into the data prop field of the table, it raised the error that “invalid key”.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59fed9aea60bc6fd4310b8e75ac561f2b5673274.png)

I know that the issue came from the ‘Site Name’ key. Because it contains a space character in the key. My question is how we can config the header with some special characters such as the space character in column keys.

Thank you so much for your time!

---

<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:** [November 27, 2021, 3:40pm UTC](https://forum.inductiveautomation.com/t/create-a-valid-header-for-a-perspective-table/53505/2 "2021-11-27T15:40:50Z")

</div>

You need to supply the `columns` property to control the order and display details of the `data` property. Make the data property’s keys appropriate identifiers (no spaces). Then, for each column, in the order desired, set `columns[nnn].field` equal to the column identifier. Then set `columns[nnn].header.title` to the column name to be displayed. This title may have any characters you like.

[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table)

---

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [November 27, 2021, 5:51pm UTC](https://forum.inductiveautomation.com/t/create-a-valid-header-for-a-perspective-table/53505/3 "2021-11-27T17:51:44Z")

</div>

Yeah, thank you so much for your help. I did not notice columns[nnn].header have a title property 😂
