Change the binding of a control InfoPath 2007
Author: mety Labels:: Change the binding of a control InfoPath 2007The controls in which users enter or select data on a form, including text boxes, check boxes, and list boxes, are bound (bind: To connect a control to a field or group in the data source so that data entered into the control is saved. When a control is unbound, it is not connected to a field or group, and so data entered into the control will not be saved.) to fields (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) and groups (group: An element in the data source that can contain fields and other groups. Controls that contain other controls, such as repeating tables and sections, are bound to 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 (view: A form-specific display setting that can be saved with a form template and applied to form data when the form is being filled out. Users can switch between views to choose the amount of data shown in the form.) 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 (data validation: The process of testing the accuracy of data; a set of rules you can apply to a control to specify the type and range of data that users can enter.), conditional formatting (conditional formatting: The process of changing the appearance of a control, including its visibility and read-write state, based on values entered into the form.), and rules (rule: A condition or action, or a set of conditions or actions, that automatically performs tasks based on events and values in the form.), 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.
|