toDataSet
This function is used by Ignition's Expression language.
Descriptionβ
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.
Syntaxβ
toDataSet(value[, failover])
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| Object | value | The value to type cast, typically a DataSet or PyDataSet. |
| Object | failover | The failover value if type casting fails. [optional] |
Resultsβ
Dataset - The value type cast as a dataset.
Examplesβ
Code Snippet
toDataSet(runScript("app.funcs.runSomeFunction()")) //coerces the value returned by a project scripting function into a dataset.