Promotic

FillFromInfo - method of the PmgWTable object

Description:
The method serves for reading data from general objects of the INFO system that make Pma objects accessible for the designer by the PmaObject.GetInfo method. Either all data are read into the internal table buffer ("static" style) or the table stores the reference to the object ("bind" style), then the INFO object is asked only for a part of the current data on each request for displaying the data (on scrolling or calling the Draw method or on the first drawing).
Syntax:
Empty FillFromInfo(Object Object, String Style)
Parameters:
Object(Object) The reference to the object of the INFO system that can be obtained by the PmaObject.GetInfo method and from which the data are read.
Style(String) Specifies how the data are read from the object. The values are:
"static" - Data from the object are read together and stored into the table when calling this method
"bind" - Data from the object are read and stored into the table when calling this method and the data read from the object will be refreshed on the next moving in the table or by calling the Draw method.
Note:
INFO objects are supported in objects PmaDatabase and PmaDataTable, the data can be read from these two objects.

This method is not functional in Web panels.
Example:
It is necessary to bind the data in the Pma object "/Data/MyData1" with the PmgWTable object. In the panel, on the "Methods" tab, a The designer's "GetDataInfo" method is created. This method will contain the following script:
JavaScriptVBScriptSelect and copy to clipboard

return pMe.Pm("/Data/MyData1").FillFromInfo("data");
In the initialization of the Pmg object (in the onStart event) is the following script: Thus the PmgWTable object is by the FillFromInfo method filled up by the information about the object "/Data/MyData1" and the bind parameter specifies that this binding has to be kept all the time of the visualization. Now it is enough for example in the onRefresh event of this object to call only the Draw method that finds out new values from the Info object and displays them on the screen in the Pmg object:
JavaScriptVBScriptSelect and copy to clipboard

var aDataInfo = pMe.PmPanel.Methods.GetDataInfo();
pMe.FillFromInfo(aDataInfo, "bind");
pMe.Draw();
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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