Macro expression $.expr

This macro returns the evaluated expression written in JavaScript syntax.


where "expression" may contain:

Constants. 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 string), or backslash \" must be written before the quotation marks.

Other macros. It is also possible to access for example Parameters of the PROMOTIC object, Parameters of graphic item, paths to files, values in configuration files, etc.
The pMe variable. Represents Promotic object or Graphic item - 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.
The 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 Var object, containing the data extension, accessible.
The 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.).
Value of the xx parameter 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).
Value of the xx parameter 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 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 PmTrend object. The filename is identical with the identification name of the trend group (See property PmTrend.GroupId).

Configuration items in extended value editor:
JavaScript expressionExpression written in JavaScript syntax
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice