Binding the data to fields and table cells

After you connect to a data source, you need to indicate where you want to see the data in the form design:

  • To bind single fields, such as the P.O. Number and P.O. Date, you can use the drag and drop method.

  • To bind repeating objects, such as the row in the purchase order table, to repeating items in the schema, use the Data Binding box in the Binding tab of the Object palette. After the row is bound, you can bind cells in the row to nodes in the schema, which makes these bindings relative to the row binding.

To bind the data to fields in the form design

  1. In the Data View palette, select poNum and drag it to the P.O. Number field.

  2. In the Binding Properties dialog box, select Don’t Update Any Related Properties, and then click OK.

    Binding associates an existing form field with an item from the data source. In the image, the icon to the right of poNum shows that the node is bound. Because you chose not to update any related properties, Designer keeps the formatting you have already applied to the field object intact.

  3. Repeat for the remaining items in the Data View palette (except for partNum, description, quantity, and unitPrice).

    For example, companyName should be bound to the Ordered By field.

To bind the data to table cells in the form

  1. In the Hierarchy palette, select Row1.

  2. In the Object palette, click the Binding tab.

  3. Click the triangle beside the Data Binding (Open, Save, Submit) box and select a binding. For example, select DataConnection > item > item.

    The following string appears in the Data Binding (Open, Save, Submit) box:

    $item.item[*].

    You can type this string into the Data Binding (Open, Save, Submit) box instead of selecting it.
  4. Open the Data View palette.

  5. To ensure that the binding is set the way you prefer, bind each node to a cell by using the drag and drop method. For example, in the Data View palette, select partNum, and drag it to the cell under the heading Part No.

  6. In the Binding Properties dialog box that appears, select Don’t Update Any Related Properties and click OK.

  7. Repeat for the remaining items in the Data View palette under item (description, quantity, and unitPrice).

Click to continue: Specifying a data file

// Ethnio survey code removed