# Expression to get column names from a dataset

**URL:** <https://forum.inductiveautomation.com/t/expression-to-get-column-names-from-a-dataset/9264>\
**Category:** Ignition\
**Created:** [October 31, 2014, 3:58pm UTC](https://forum.inductiveautomation.com/t/expression-to-get-column-names-from-a-dataset/9264 "2014-10-31T15:58:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfitze](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sfitze](https://forum.inductiveautomation.com/u/sfitze)\
**Post date:** [October 31, 2014, 3:58pm UTC](https://forum.inductiveautomation.com/t/expression-to-get-column-names-from-a-dataset/9264/1 "2014-10-31T15:58:23Z")

</div>

I want to populate a dropdown with the column names from a table. I have it working with python scripting but I can’t figure out how to do it using an expression. What I want to do is get the column names from one dataset into the rows of another in an expression.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [November 6, 2014, 12:19am UTC](https://forum.inductiveautomation.com/t/expression-to-get-column-names-from-a-dataset/9264/2 "2014-11-06T00:19:27Z")

</div>

why do you want to do it in the expression language if you already figured out how to do it in a python script?

you can call your script from the expression language using the expression function

```auto
runScript("project.example.yourscript()")
```

---

<div class="post-metadata">

**Author:** ![sfitze](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sfitze](https://forum.inductiveautomation.com/u/sfitze)\
**Post date:** [November 12, 2014, 6:45pm UTC](https://forum.inductiveautomation.com/t/expression-to-get-column-names-from-a-dataset/9264/3 "2014-11-12T18:45:41Z")

</div>

@jonathon

As far as I know I can’t (easily) pass a dataset to the python script. I would have to either write a script for each dataset or convert the dataset to JSON or CSV and pass it as text.
