Add List Boxes and Combo Boxes
List box and combo box are Control Types that display a field as a list box or a text box with options from a selected table or view. The recommendation is to create a view based on the table(s) for the list box or the combo box. This SQL view (or table) stores selectable options available in a list box or a combo box, and is registered to the Stewardship Tier page as a column property.
Use a list box when the list view contains a finite number of records that can display in a short, scrolling list.
Use a combo box when the list view contains too many records to display as a list box. This option allows users to start typing in order to find values included in the list view. Combo boxes also have the advantage of a more advanced search.
When creating list views
- Create a view based on the tables used for the list box or combo box, and use the naming convention webXXXList where XXX describes what is being listed, for example, webProductList.
- Include only the columns that apply to the
- List Value—the value stored in the table
- List Display—the option visible in the list box or combo box
- List Selection—a more descriptive text for a list box or combo box
- List WHERE clause—restricts values that display in a list box or combo box
- Include a unique set of data.
Include both a description field, and a combined value and description field.
NOTE:To prevent the display of duplicate information, do not display the description and the combined value/description on the combo box filter page for the fields. Accomplish this by adding a column property where View Type is set to Filter (Control) and Control Status is set to Hide. Create this same column property for fields within the list view that do not aid in the combo box search.
- Do not sort in the view. Sorting is done in the Stewardship Tier using the List Order By Column Property. Sorting is not officially supported in later versions of Microsoft SQL Server.
- Create a column property with View Type set to Control to define the list view properties for fields which have check tables.
To create a list box or combo box:
- Select the name of the list box or combo box from the COLUMN list box.
- Select List Box or Combo Box from the CONTROL list box.
- Click Save.
- Click Vertical View.
- Click Edit.
- Click the General tab.
- Select the applicable list box or combo box view from the List Source list box.
- Select the field that stores the value from the List Value Field list box.
Select the field that displays a description of the value from the List Display Field list box.
NOTE:In most cases, List Value Field is the primary key stored in the table and List Display Field is the option visible in the list box.
- Click Save.
These settings are available for List Boxes and Combo Boxes: