SetItem - method of the PmArray object

Sets the value in the item defined by indexes i and j.
Empty SetItem(Variant vValue, Long i, [Long j])
vValue(Variant) Value
i(Long) Array index (zero-based index).
j[optional] (Long) Array index (zero-based index).
In case of the 1-dimensional array the parameter is not used or its value is -1.
This method is also functional in Web panels.

The value can be set only to the item that exists in the array (the items are created by the Create method).
If the array needs to be bigger then instead of using the SetItem method, call the Insert method.
1-dimensional array
JavaScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray(1, 3);
arr.SetItem("Test0", 0);
arr.SetItem("Test1", 1);
// ...
2-dimensional array
JavaScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray(2, 3, 5);
arr.SetItem("Test", 0, 2);
// ...

var val = arr.GetItem(0, 2);   // val = Test

Pm8.02.00: Created
PROMOTIC 9.0.22 SCADA system documentation - MICROSYS, spol. s r.o.

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