Skip to main content
Version: 7.9


This function is used by Ignition's Expression language..


Tries to coerce value into a dataset. Not many things can be coerced into datasets. Namely, only DataSets and PyDataSets can be coerced into DataSets. This is useful for the runScript() expression, to convince the expression compiler to let you assign the return value of a scripting function to a DataSet property.


toDataSet(value[, failover])

  • Parameters

    • object value - The value to type cast, typically a DataSet or PyDataSet.

      object failover - Optional. The failover value if type casting fails.

  • Results

    • DataSet - The value type cast as a dataset.


Code Snippet
toDataSet(runScript("app.funcs.runSomeFunction()")) //coerces the value returned by the a project scripting function into a dataset.