Contents
Partner Programs
Sepasoft - MES Modules
Cirrus Link - MQTT Modules
Resources
Knowledge Base Articles
Inductive University
Forum
IA Support
SDK Documentation
All Manual Versions
Ignition 8.0
Ignition 7.9
Ignition 7.8
This feature was removed from Ignition in version 8.0.0
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)
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.
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:
ProductCode | Quantity | Weight |
---|---|---|
BAN_002 | 380 | 3.243 |
BAN_010 | 120 | 9.928 |
APL_000 | 125 | 1.287 |
FWL_220 | 322 | 7.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.