Promotic

GetPrivateData - method of the PmUser object

Description:
Reading the previously saved value with the specified identifier and bound with specific loged user.
Syntax:
Variant GetPrivateData(String sId)
Parameters:
sId(String) Text identifier of the value. There can be multiple saved values - the text identifier is used in order to distinguish them.
Return value:
If the variable with the specified identifier exists, then the method returns previously saved value (the data type is the same as for saving).
If variable does not exist, then the method returns: null for JavaScript or Empty for VBScript (it can be tested by the Pm.IsValid method).
Note:
The value je bound with specific logged local or network user. It means that if two users save the values with the same identifier, then the values will not be overwritten because the variables are located in two separate logged users.
If two users log in into a PROMOTIC application via the Web using the same login and password, then the system will consider them as two separate users. The assistant values can be used by the Web application for example for passing the values between Web panels, thus replacing the global variables in the local application in a particular way.
The assistant values will be stored during the period the user is logged into the server (session). After the local user logged or the network user expired the logged user object is released, together with the assistant values stored in it.
 
See Reading the private data by the client.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var valPrivData = pContext.User.GetPrivateData("test");
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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