Combo boxes are data entry interface objects used when you want to provide users with the option of selecting an item from a list, OR typing in an entry.
There are times when it is advisable to control the values that a user might enter. Lists are a common data entry object used for this purpose. Lists insure that the user enters a correct value enhancing data integrity and enabling efficient searches and sorts.
The benefits of choosing items from a list are that typos are eliminated, thus any item entered is correctly spelled, and all entries are valid.
For example, if a user wished to enter a value in an Invoice record for "purchase order" in a Payment Method field, they might enter "Purchase Order", or PO", or "P.O." By using a choice list, all users will enter the same value: "Purchase Order". The benefit of this is that if the user wants to do a Query to find all invoices paid by purchase order, the following single criteria search can be done:
Query([Invoices];[Invoice]PaymentMethod ="Purchase Order").
Since the value entered for purchase order will be "Purchase Order", we can be sure that the Query will return all the appropriate records.
Without a choice list, the following multi-criteria search would have to be done:
4th Dimension provides several ways to implement choice lists:
· 4D's built in choice lists:
· Drop-down lists / Pop-up menus
· Combo boxes
Let's consider each of these options.
4D's built-in choice lists:
4D's built-in choice lists are the easiest to implement because no coding is needed.
However, 4D's built-in choice lists sometimes have a behavior that is NOT what the user needs. That is, the list will pop-up every time the user tabs into the field. Sometimes users wish to be able to tab through the fields without having the choice list pop-up, and they experience this behavior as an interruption in the data entry process.
Field before a 4D built in choice list is displayed:
Field with a 4D built in choice list displayed:
Drop-down lists / Pop-up menus:
These lists are also easy to implement, but not as easy as the built-in choice lists because their implementation requires that some code be written.
When using drop-down lists / pop-up menus, the user is restricted to the items on the menu. There are times where this is exactly the implementation that is needed, and drop-down lists / pop-up menus are a good solution.
However, in some situations a drop-down list / pop-up menu is not desirable because it requires the use of the mouse; the change of data entry mode from keyboard to mouse is experienced as an interruption in the data entry process.
Drop-down list / pop-up menu object before the user clicks on the object with the mouse.
Drop-down list / pop-up menu object after the user clicks on the object with the mouse.
Combo boxes are also easy to implement, but again, their implementation requires that some code be written.
Combo boxes solve the user objection to 4D's built-in choice lists popping-up when tabbing through the fields, by enabling the user to tab through the field without the list popping-up. Additionally, combo boxes provide users with the choice of selecting an item from a list, OR typing an entry. When this type of interface is needed, combo boxes are the tool to be used.
Combo box without menu displayed:
Combo box with menu displayed: