# Conditional formatting in table

**URL:** <https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 24, 2021, 7:57pm UTC](https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449 "2021-11-24T19:57:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntheuer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@ntheuer](https://forum.inductiveautomation.com/u/ntheuer)\
**Post date:** [November 24, 2021, 7:57pm UTC](https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449/1 "2021-11-24T19:57:49Z")

</div>

So I can see where I want the data to go, and I feel like I got started in the right direction, but I cannot get my transform to name those index values ([‘Facility’, ‘SectionName’, ‘Etc’] instead of [0,1,2])

Can you please explain to me what I am doing wrong in my transform to get names on each of those column index values. I am essentially getting what I want, but without names, I cannot apply column formatting, making my table much less usable.

Thanks!

 ![pythodataset](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/c/5c4e39e48b054eadade14bbd84cdeec2deaa91a9.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 24, 2021, 8:15pm UTC](https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449/2 "2021-11-24T20:15:41Z")

</div>

Line 86 of your posted script looks like:  
`newData.append([facility, sectionName])`  
That means you’re appending a new _list_ to the data - so you’ll end up with a structure like:

```auto
[
	[
		facility,
		sectionName
	],
]

```

What you want is probably something like:

```auto
newData.append({"facility": facility, "sectionName": sectionName})

```

Where you’re instantiating a new dictionary (and thus, once JSON encoded, object) for each column of data in the output.

---

<div class="post-metadata">

**Author:** ![ntheuer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@ntheuer](https://forum.inductiveautomation.com/u/ntheuer)\
**Post date:** [November 24, 2021, 8:35pm UTC](https://forum.inductiveautomation.com/t/conditional-formatting-in-table/53449/3 "2021-11-24T20:35:35Z")

</div>

Yes that fixed it. Very fast reply

thank you very much!
