exists

[ Function ]

public static exists(
    propertyName: string,
    control: TcHmi.Controls.System.baseTcHmiControl
): boolean;

Determines whether a binding exists between a symbol and a control attribute.

Parameter

Name

Type

Description

propertyName

string

Name of the attribute

control

TcHmi.Controls.System.baseTcHmiControl

Reference to the control instance

Return value

Type

Description

boolean

Returns true if the attribute is linked to a symbol.

exists 1:

Available from version 1.10

Sample - JavaScript

var myControl = TcHmi.Controls.get('TcHmiTextbox_1');
if(myControl){
    var result = TcHmi.Binding.exists('Text',myControl);
    if(result){
         // Binding exists
    } else {
         // Binding exists not
    }
}