FileReadVariable - method of the Pm object
Syntax:
Variant FileReadVariable(String sFile)
Parameters:
sFile | (String) The file name with the path.
If a full path is not entered, then it is completed relative to the application folder.
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files or folders. |
---|
Note:
The read value can be of any data type, including an array.
If it cannot be read, then returns:
null for
JavaScript or
Empty for
VBScript (it can be tested by the
Pm.IsValid method).
This method
is not functional in
Web panels.
Example:
JavaScriptVBScriptSelect and copy to clipboard
var Value = Pm.FileReadVariable("#data:Value1.dat");
if (Pm.IsValid(Value))
{
// .. on success
}
else
{
// .. on error
}
Dim Value
Value = Pm.FileReadVariable("#data:Value1.dat")
If Pm.IsValid(Value) Then
' .. on success
Else
' .. on error
End If