Update cookies preferences
Promotic

GetArray - method of the PmaDataTable object

Description:
Creates an array of values from selected data items of the object.
Syntax:
Array GetArray(String sType, Variant index)
Parameters:
sType(String) Type of selected values in the table:
"Row" - One row of the table is selected (i.e. 1-dimensional array is created).
The index value must be an integer:
- index>=0 means the index of the selected row (zero-based index).
- index=-2 means the last row.
"Col" - One column of the table is selected (i.e. 1-dimensional array is created).
The index value must be of the String type or of the Integer type:
- If it is of the String type, then it is the column name.
- If it is of the Integer type, then:
- index>=0 means the index of the selected column (zero-based index),
- index=-2 means the last column.
"Table" - The whole table is selected in the form of the array of rows (i.e. a 2-dimensional array is created as default Col,Row). See (Col,Row) - 2-dimensional array meaning an array of rows.
The index value must be set to the value: null for JavaScript or Empty for VBScript.
"All" - Caution! The whole table is selected in the form of the array of columns (i.e. a 2-dimensional array is created as default Row,Col).
The index value must be set to the value: null for JavaScript or Empty for VBScript.
index(Variant) Index into the table whose meaning is defined by the sType parameter.
Return value:
2-dimensional array of values (PmArray object for JavaScript or Array data type for VBScript).
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oDataTable = pMe.Pm("/DataTable");
var arr = oDataTable.GetArray("All", null);
Example2:
1-dimensional array containing values from the second row is assigned into the arr variable:
JavaScriptVBScriptSelect and copy to clipboard

var oDataTable = pMe.Pm("/DataTable");
var arr = oDataTable.GetArray("Row", 1);
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.