Creating a basic data form

Data forms always contain at least three elements:

  • Data Source
  • DB Table
  • Field Control

Always consider these elements when creating a new data form. After you have created and defined a new data form, on the form builder screen:

  1. From the Data tab of the Toolbox, click the Data Source icon.
  2. In the workspace, click where you want to place the data source.

    The new data source, named DataSource1, is displayed.

    Since the data source control is not visible at run-time (when the form is rendered), place the icon anywhere on the workspace. Ideally, place the icon near a corner of the workspace so that the icon does not interfere with the other icons within the form.

  3. Change the data source Name to one that more appropriately describes the purpose of the data source.
  4. Set the data source to one of the following Property: Types:
    • Select Type: Query if the data source extracts database information based on a query statement.
    • Select Type: Table if the data source extracts database information from a single table.
  5. If you selected Type: Query, specify the query statement in the Parameter SQL window.
  6. Make any other necessary changes to the remaining data source properties.
  7. From the Data tab of the Toolbox, click the DB Table icon.
  8. In the workspace, click where you want to place the DB Table.
    The new DB Table, named DBTable1, is displayed.
  9. Change the DB Table Name to one that describes the purpose of the DB Table.
  10. Set the DB Table Datasource property by selecting the data source to which the property should point.

    In this example, the DB Table is pointing to the dsColor data source:



  11. Make any other necessary changes to the remaining DB Table properties.
  12. From the Controls tab of the Toolbox, click the field control icon that you want to place in the DB Table.
  13. In the workspace, click inside the appropriate cell of the DB Table to place the new field control.

    The new field control is displayed inside the cell.

    In this example, eight Label field controls have been added to the DB Table:



  14. Change the field control Names so that they appropriately describe their purposes.
  15. Change the Caption property of all field controls in the heading row of the DB Table so that the DB Table data is appropriately titled.

    In this example, the four Label field control Captions have been appropriately named Color ID, Color Name, Color Description, and Color Value, respectively. The labels have also been bolded.



  16. Within the DB Table, assign all remaining field controls to a Datasource and a Datafield:
    1. Verify that Property: Datasource points to the appropriate data source.
      The Datasource value of the field control automatically points to the data source name to which the DB Table points.
      For example, if the DB Table points to the dsColor data source, then the field controls automatically default to Datasource: dsColor.
    2. Select the Datafield (database field) property to which the field control is mapped.

      The Datafield value list populates with the database fields to which the data source points.

      For example, if Datasource points to the dsColor data source, then the Datafield value list is populated with the database fields within the WFM COLOUR table.



  17. Make any other necessary changes to the remaining field control properties.
  18. Make any other changes to the data form to make the form easy to use.
  19. To save the new Data Form properties, select File > Save.
  20. To test the new data form, select Data Forms.
    The Forms screen is displayed with a list of all existing data forms.
  21. Click Open next to the data form to drill-down to the data form details.
    The system generates the data form details. The results appear within the data form.

    For example, this window displays the data generated for the WFM System Colors data form. Each time the WFM System Colors data form is generated, the data form is updated with the most recent information from the WFM COLOUR database table.