Data Access User Manual > Rogue Wave Views Data Access Common Framework > Hints and Tips for Using Data Access > Working with DbFields in Data Access > Creating a Form Using the Forms Assistant
 
Creating a Form Using the Forms Assistant
A form in Data Access is a set of gadgets that lets you display all the values in a table object row, thus providing easier access than with a table gadget. An instant form can be obtained from the Forms Assistant command in the Data Access menu in Rogue Wave® Views Studio.
If you create a form using the Forms Assistant command, a set of fields (IliDbField objects) are displayed. Each field is connected to one of the columns of the data source table object and has a label that is the title of its associated column. There is an IliDbNavigator across the top of the panel to help you navigate through the table object records.
The Forms Assistant can also create a form based on a table gadget instead of on a set of DbField gadgets.
You may notice that the DbField gadget automatically adopts the IliTableComboBoxStyle for columns that either contain a Boolean value or have a foreign table mapping (see Foreign Tables). In the case of a Boolean, the pop-up menu has two entries, Yes and No.
A Form Showing the Automatic Combo Box for Columns with a Limited Value Domain
It can be useful to change the style of the DbField with a Boolean value to a toggle gadget. See The Style of a DbField for information on how to change the style.
Forms Assistant Pages
The Forms Assistant has four notebook pages that let you change various presentations.
The Data Page of the Forms Assistant
The Data page is used to select the data source using the data source combo box. In the table column, you can specify which data source columns will have a DbField and choose the type of DbField used to display the information (text, toggle, combo box, and so on). The Table gadget style check box is used to create a form with a table gadget. You can also choose the presentation of the DbField in the panel (Arrange top to bottom or left to right) using the combo box at the bottom of the page.
The Title page is used to change the title name and its presentation (color and font).
The Fields page lets you change the Labels and Fields presentation.
The Navigator page lets you activate or de-activate various navigator and the position of the navigator.
To apply changes and display information in the Main window, click OK.
Columns with a Foreign Table
As shown in Figure 6.6, the DbField that is linked to a column with a foreign table is set automatically to the IliTableComboBoxStyle. In addition, it automatically has the same foreign table as the table column (this can be seen in its inspector). This occurs only when the forms assistant is activated on a data source that already has a foreign table mapping.
If you create a DbField and link it to a data source column yourself, the foreign table will not automatically be set for the DbField gadget.
For more information on foreign tables and how they can be linked to table objects and data-source-aware gadgets, see Foreign Tables.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.