The value of the data binding is a value obtained by evaluating **general expression**. The value can be a number (Integer, Single ..), Boolean or String.

Control variable | In this field it can be defined the control variables. The first variable is named v1, the second v2, etc. The variable names are then used in the general expression.
The data binding is defined for each variable, which is evaluated right before calculaing the general expression. |
---|---|

Add | Adds new control variable to the end of the list. |

Insert | Insert new control variable above the selected variable. |

Delete | Delete the selected control variable. |

JavaScript expression | Expression written in the JavaScript language syntax. See The JavaScript operators and syntax description.
Macro expression can be used for input (it is evaluated while the window is opening). In the expression can be used: - object pMe: represents the Pmg object containing this data binding. See the example Example4.
Caution: The pMe parameter in this data binding can be used to get any value from any Pmg object of this panel. However this should not be used for calling pMe.PmPanel.Methods, because such calling would initialize synchronous communication with the server causing intensive communication load on Web clients. |

This data binding is also functional in Web panels. The evaluation of the data binding does not need to communicate with the Web server (with the PROMOTIC application) - the evaluation is done on the client side (i.e. on the Web browser).

Simple expression containing two variables v1 and v2, multiplication, addition, division, subtraction and brackets.

`2 * (v1 + 3) / 2 - v2`

The expression returns a value of type String and contains conditional evaluation (? :).

If v1 has the value 1, then returns the "start" value, otherwise returns the "stop" value.

If v1 has the value 1, then returns the "start" value, otherwise returns the "stop" value.

`v1==1 ? "start" : "stop"`

More complex expression with multiple conditional evaluation (this kind of expression can sometimes replace by the "T - Data binding to calculation based on a table of values" data binding).

- if v1 is equal to 0, then result is 12

- if v1 is equal to 1, then result is 24

- if v1 is equal to 2, then result is 50

- otherwise result is 0

`v1==0 ? 12 : (v1==1 ? 24 : (v1==2 ? 50 : 0))`

Example of **linear value conversion**. This expression can replace the "LN - Data binding as linear function calculation" data binding.

Let the linear conversion be as follows (values 80, 90, 5, 6 can be replaced by any other):

Let the linear conversion be as follows (values 80, 90, 5, 6 can be replaced by any other):

- if v1 is equal to 80, then result is 5

- if v1 is equal to 90, then result is 6

`(v1-80)*(6-5)/(90-80) + 5`

The following conditions can also be added

- if v1 is less or equal 80, then result is 5

- if v1 is greater or equal 90, then result is 6

`v1<=80 ? 5 : (v1>=90 ? 6 : ((v1-80)*(6-5)/(90-80) + 5))`

Send page remarkContact responsible person

Navigation:

- E - Data binding to the general expression