This function is used by Ignition's Expression language



This function is only available in Transaction Group Expression Items and Expression Tags.

Retrieves a value from a global variable DatasetName created using the ExecuteQuery function.


getDatasetValueByIndex(datasetName, row, column, fallback)

  • Parameters

string datasetName - The name of the dataset created using the executeQuery function.

int row - The row index

int column - The column index.

Object fallback - A fallback value if the lookup fails.

  • Results

Object - The value at the given row and column index. They type returned matches the type of the value selected.


For example, suppose you had a dataset called 'MyResult' with this information in it:

ProductCodeQuantityWeight
BAN_0023803.243
BAN_0101209.928
APL_0001251.287
FWL_2203227.889


getDatasetValueByIndex("MyResult", 0, 1, -1)  //would return 380


getDatasetValueByIndex("MyResult", 1, 2, -1)  //would return 9.928


getDatasetValueByIndex("MyResult", 0, 3, -1) //would return -1 because there is no fourth column and it reverts to the fallback value.