Macro expression $.expr

This macro expression returns the evaluated expression written in JavaScript syntax.


where "expression" may contain:

- Constant: Numeric (e.g. 1, 3.14) or string (e.g. '.mdb', 'Pressure').

Caution! String constants must be written with simple quotation marks (if doubled quotation marks were used for the whole expression), or backslash \" must be written before the quotation marks.

- Other macros: It is also possible to access for example Parameters of the Pma object, Parameters of the Pmg object, paths to files, values in configuration files, etc.
- pMe variable: Represents Pma object or Pmg object - depending on the object where the macro is defined. The pMe can then be used for accessing properties nad methods. Caution! This variable is not functional for Web panels and data extensions.
- pDE variable: Only for data extensions where it substitutes the pMe variable. Represents the scripting interface of data extension, see Data extensions. The pDE.Var property (for example ExtAlarmAnalog.Var) makes the PmVar object, containing the data extension, accessible.
- Pm variable: Represents the Pm object.

Caution! This is a special, limited version of the Pm object that allows to use its mathematical, string, array, date, etc.. However the functions related to the application itself or to the PROMOTIC system are not available (e.g. the logged-in user, application priority, launch date, calling global methods, etc.).

The xx parameter value is 3. Then the evaluated expression equals to 13yy (not 4yy) because of the string summation. The value of the parameter ($.par) always returns string. JavaScript always executes the + operation as a string summation if there is at least one string among the operands. The mathematical sumation is executed only if both operands are of the numeric type (see Example2).
The xx parameter value is 3. Then the evaluated expression equals to 4yy because of the mathematical summation. The value of the parameter ($.par) always returns string that is converted by means of the Pm.ToNumber function into a number. JavaScript executes the + operation as a mathematical summation because both operands are of the numeric type (difference from Example1).
Path to the Microsoft Access database file (.mdb) used by the PmaTrendGroup object. The file name is identical with the identification name of the trend group (See PmaTrendGroup.GroupId property).

Configuration items in extended value editor:
JavaScript expressionExpression written in JavaScript syntax

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

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice