Thursday, February 16, 2017

Change the binding of a control

Change the binding of a control

The controls in which users enter or select data on a form, including text boxes, check boxes, and list boxes, are bound to fields and groups in the form's data source. The data source, which is visually represented by folder (group) and document (field) icons in the Data Source task pane, stores the data associated with the form. If a control is not bound to a field or group in the data source, or if it is bound incorrectly, the information entered into the control cannot be saved.

Occasionally, you may find that you need to change the binding for a control on your form template. For example, if you copy a text box and paste it within the same view of your form template, you see a message when you move your mouse over either of the text boxes indicating that they store duplicate data. This occurs because the text boxes are bound to the same field. In this case, you can rebind one of the text boxes to a different field in the data source.

Note: Certain business logic features, including data validation, conditional formatting, and rules, are based on fields and groups, not controls. For this reason, when you change the binding for a control, you may lose any data validation, conditional formatting, or rules that are associated with the original control.

  1. Right-click the control whose binding you want to change, and then click Change Binding on the shortcut menu.

  2. If your form template uses more than one data source, click the one that you want to use in the Data source list in the Control Binding dialog box.

  3. Do one of the following:

    • To create a new field or group to bind the control to, right-click the group to which you want to add the new field or group, click Add on the shortcut menu, enter the appropriate properties in the Add Field or Group dialog box, and then click OK.

    • To bind the control to an existing control, click the field or group that you want to bind the control to, and then click OK.

  4. To test the control and verify that the binding is correct, select the control on the form template. The icon that appears on the control indicates whether it is correctly bound to its field or group.

    Binding icons

    There are three possible binding icons.

    Icon

    Description

    Icon image

    The binding is correct.

    Icon image

    The control may not function as expected. To identify the potential problem, right-click the control, and then click More Details on the shortcut menu.

    Icon image

    The control will not function correctly. To identify the problem, right-click the control, and then click More Details on the shortcut menu.

No comments:

Post a Comment