# Populating Dataset Expression Tag with runScript calling a global shared script

**URL:** <https://forum.inductiveautomation.com/t/populating-dataset-expression-tag-with-runscript-calling-a-global-shared-script/15997>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [November 14, 2017, 10:52pm UTC](https://forum.inductiveautomation.com/t/populating-dataset-expression-tag-with-runscript-calling-a-global-shared-script/15997 "2017-11-14T22:52:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill.liu](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bill.liu](https://forum.inductiveautomation.com/u/bill.liu)\
**Post date:** [November 14, 2017, 10:52pm UTC](https://forum.inductiveautomation.com/t/populating-dataset-expression-tag-with-runscript-calling-a-global-shared-script/15997/1 "2017-11-14T22:52:12Z")

</div>

I created an expression tag on the gateway with data type set to Dataset.

This works correctly:

```auto
runScript('system.dataset.toDataSet([],[])')

```

This doesn’t work:

```auto
runScript('shared.tracking.read_data_to_dataset.read_data_to_dataset()')

```

The script runs fine in the Script Console, the content of the script is:

```auto
import system

def read_data_to_dataset():
    return system.dataset.toDataSet([],[])

```

I also tried using global scope to store the dataset

```auto
import system

tracking_data = system.dataset.toDataSet([],[])

def read_data_to_dataset():
    return tracking_data

```

The error message in Tag Diagnostics is not helpful. Ignition 7.9.2

---

<div class="post-metadata">

**Author:** ![bill.liu](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@bill.liu](https://forum.inductiveautomation.com/u/bill.liu)\
**Post date:** [November 15, 2017, 12:55am UTC](https://forum.inductiveautomation.com/t/populating-dataset-expression-tag-with-runscript-calling-a-global-shared-script/15997/2 "2017-11-15T00:55:43Z")

</div>

Problem solved. I didn’t click save.
