Populating Dataset Expression Tag with runScript calling a global shared script

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

This works correctly:

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

This doesn’t work:

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:

import system

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

I also tried using global scope to store the dataset

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

Problem solved. I didn’t click save.

1 Like