Page 373
form. The equal sign in front of the properties denotes that the value was supplied by the visual attribute.
FIG. 14.31
The LOV and record
group on the object
navigator.
FIG. 14.32
The Dept LOV property
sheet.
The Functional set of properties contains several properties that you would be interested in. These properties are described in Table 14.5.
Table 14.5 LOV Properties
Property Name | Description |
Auto Confirm | Determines what happens when the list is reduced to ONE item.A value of true will automatically dismiss the LOV and assign the value |
continues
Page 374
Table 14.2 Continued
Property Name | Description |
to the item. A value of false allows the operator to select the row or dismiss the LOV. | |
Auto Display | Determines whether the LOV will be displayed automatically when the operator navigates to the item to the LOV. |
Auto Refresh | Determines whether the query will be performed to populate the LOV each time the LOV is launched. |
Column Mapping | Opens the LOV column mapping dialog box. |
Long List | Used when the results of the query will produce a large amount of records. A value of true will cause a Criteria Select box to appear before the query is performed. This box will allow the user to enter conditional information that reduces the number of records fetched to the LOV. It can dramatically increase response time against large tables. |
LOV Type | Determines how the developer intends to reference the record group. Selecting the record group values indicates that the LOV will use an existing record group. The query setting indicates you intend to create a record group for the LOV. Selecting t the value will allow you to open a multi-line field to enter and apply your query. The V2-Style is used from backward compatibility. |
The Functional section properties retain their default values. The column mapping properties need to be modified.
TIP |
I have had some LOVs that populate four or five fields. They are usually based on a record group that contains a join query. These values go into nondatabase reference text items on the form. An example of this type of field would be the department_name field on block ONE. It is not contained on the Employee table but would enhance the information on the block. |
Page 375
I don't like to see all of these reference fields on the LOV when I select a value, but I want to return the values to the form. I solve this problem by placing the values on the LOV column mapping dialog box, but making sure the LOV window width is small enough they cannot be seen by the operator.
FIG. 14.33
The LOV Column
Mapping dialog box for
the DEPT LOV.
The next step is to link the LOV to an item on the fk_department item on block ONE of the Employee Update form. This is done on the item's property sheet, as shown in Figure 14.34. There are four relevant properties. The LOV property specifies then name of the linked LOV. The LOV X Position and LOV Y Position properties are used to position the LOV on the form. These do not need to be set if properties were set on the LOV property sheet. The final property is LOV For Validation. Setting this property to true will cause Forms to use the LOV record group query during the validation process. The form will not allow the operator to navigate from the item unless the entered value exists as a value in the set of records returned by the record group. If the value does not exist, Forms will automatically display the LOV. The operator can then choose the correct value.
FIG. 14.34
The Fk_department
item's property sheet
displaying the LOV
properties
Page 376
Forms has two manners of launching LOV's. The first method is to display it automatically when the operator navigates into the item. This happens when the LOV Auto Display property is set to true. The second method is to launch the LOV by navigating to the item and pressing the List of Values function key (F9).
The operator determines the item has a linked LOV by a message at the bottom of the screen. Figure 14.35 displays the Employee Update form with the message displayed. Whenever the operator navigates into an item that has an attached LOV, the expression <List> is displayed in the message line.
Fig. 14.35
The Employee Update
Form displaying the
<List> message.
Clicking the F9 function key will display the DEPT LOV, as shown in Figure 14.36. The LOV displays by default all of the records returned by the query. The operator can scroll through the list by using the scroll bar. If the list is large, the operator can place some characters into the Find item at the top of the LOV. When the Find button is clicked, the query will be re-executed by using these characters in a conditional statement. The LOV will display only records that match the Find expression. To select an item into the form item, select the row on the list and press the OK button. This will shut down the LOV with the values returned to the form items.
The function key method is not a very user-friendly method. The users seldom remember the function key and usually don't notice the <list> message. To solve this problem, the developer