Binding Properties

Bindings are used to animate a WebPage, and are created between a job tag and a parameter of the interactive Web Page element. For example, using a Label to display the value of a numeric variable.

When an element is selected in the Web Page, the element's parameters are displayed in the Properties window. If a parameter has an arrow () icon beside it, it can be bound to a tag. Once bound, the icon will change to indicate whether the binding flows only one direction (into the element Property) or both ways (into and from the element Property).

The icon indicates a one-way binding. These generally refer to bindings between an expression or an association, where the value of the expression and/or association will be written into the Property.

The icon indicates a two-way binding. These generally refer to bindings to a tag, where the value is written into the Property, and the value will also update the value of the tag. For example, if you have a CheckBox element and the Checked Property is bound to a tag, when the job is online and the CheckBox is checked or unchecked by a user, the tag's value will be updated based on the user interaction. When the job goes offline, the tag will display the state of its last interaction, i.e. if it was checked, it will display True.

  1. Click on the icon to launch the Expression Builder.

  2. Use the Expression Builder to create an expression that is connected to the element property. Once the expression has been created, the icon will change to either or , depending on the type of binding.

    Note:
    • During development of a job, if a binding has become invalid, it will change to: . A binding can become invalid if a Property was bound to a tag, and that tag is deleted. For example, if an element's Border Size Property was bound to a tag with an integer data type, and the tag is deleted, the binding icon will indicate that the binding is no longer working.
    • If a binding becomes invalid while online, a warning message will be displayed in the Output window.
  3. When the job is online, changes in the expression will update the WebPage control, and for some input controls, updating the Web Page control will cause the expression to update.

    Note: Expressions associated with an element's bindings remain functional even when the control is disabled. This is a conventional way to display read-only data. If you would like to disable your expression at the same time the control itself is disabled, plan your expression accordingly. For example, create a Boolean tag which gives back True when the control is enabled and False when the control is disabled and use it in an if statement with your expression, or move the expression to a script and manage when it is run from there.