Step 3 Create Multiple Lists

Visual LANSA

Step 3. Create Multiple Lists

FRM055 - List Component Basics

In this step you will add a second combo box which will contain the Sections for the current department and a List View component, which will contain employee data for the selected section.

1.  Drop a second Combo Box onto the Group Box, alongside the department combo box. Position and resize it. Change its Name to SECTS.

2.  Drop a Label component above the new Combo Box. Position and resize it. Change its Caption to Sections. Remember you can use the Align dialog on the Design tab to align components. Your form should now look like the following:

3.  On the Repository tab, find the file SECTAB and expand it. Drag and drop field SECTION into combo box SECTS. Select the Details tab. Note that you are working with CBCL_3, the first column added to SECTS, based on field SECTION. Change its Visible property to False.

     Drag and drop field SECDESC into combo box SECTS. Section description will be the visible column in SECTS.

4.  Delete the fields DEPTMENT and DEPTDESC from the form.

5.  Lengthen the form and drag and drop a List View onto the lower form area. Change its Name to EMPLOYS. Resize it to occupy all the space. Your form should look like the following:

6.  Locate the file PSLMST on the Repository tab and expand it. Drag and drop fields, EMPNO, SURNAME, GIVENAME, POSTCODE and SALARY into the list view EMPLOYS. Your form should look like the following: