Conditional formatting in table

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!

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:

[
	[
		facility,
		sectionName
	],
]

What you want is probably something like:

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.

1 Like

Yes that fixed it. Very fast reply

thank you very much!