Setting Up Listboxes

A listbox is a specific type of pop-up window that lets you select an value from a list of acceptable entries for a specific data field. When a data field has a listbox created for it - all a user has to do, in change mode, is move their cursor to the field and press F4 to view the list of entries and or information in the "listbox" for that field. It is also possible to setup listboxes with default entries and/or with a command that will force an entry into that field with data from the acceptable listbox entries only. The user selects an listbox entry by moving their cursor to the desired value, the value will automatically update the data field when they press enter. The listbox will be closed automatically as the data is entered into the data field.

Listboxes are designed to make it easier to enter information into selected fields, they may also be used where the choice of information is limited or needs to be specific. For example, when you want to enter a state name in the State field, you can use a listbox to display a list of US Postal Code State values. Each State has been assigned the standard two-digit postal code. In fact the only listbox distributed with ActionWare is on data field STA, a 2 character field for State. All other listboxes must be created by the System Administrator or designated user.

There is a one character index for all listbox data. For example if you are searching for a particular State in the State field listbox you could scroll (page down) until till you found the State abbreviation you needed or you could press the 1st letter of the desired State. The listbox will resort to display all of the States beginning with the letter you chose. To select data simply move your cursor to the desired value and press enter. If the System Administrator decides to use extended functions on Validate Data and Forced Entry in listboxes you will automatically have the listbox displayed while in change mode and you will be required to choose a value entry from the listbox before completing the change. Validate Data and Forced Entry can also be setup as separate functions. Validate Data means that you must choose a value from the listbox and NOT type a value free form. Mandatory or Forced Entry means that you must choose a value from the listbox or type a value free form. Both of these advanced functions require activation via System Options.

As System Administrator you most likely will be responsible for setting up all listboxes. There are several System Options dealing specifically with listboxes. They are:


System Option Description:



Allow Listbox Maintenance. (Yes, No, Contents)


User has access to the maintenance function for listboxes. F4 = Maintain option in the listbox appears as an option when user accesses any listbox



User has no access to the maintenance function for listboxes and will not see the F4 = Maintain option in the listbox.



User can modify or add contents to a listbox but has no access to the control functions of the listbox. The user cannot force validation or entry or define a default



Activate Mandatory Fields (Yes, No, Listbox)


Requires data to be input into fields set up as mandatory with list box maintenance. A message appears at the bottom of the screen: The field at the cursor location is a mandatory field. Also referred to as Force Entry Fields option



Deactivates mandatory fields



Requires data input into fields set up as mandatory in listbox maintenance. Causes listbox to automatically appear and prompt users if they have not filled in the field before pressing Enter



Activate Field Validation (Yes, No, Listbox)


Validates data keyed into field against data values in listbox



Deactivates field validation



Validates data keyed into the field against data values in the listbox, and causes the listbox to prompt the user with approved values


See related topic:

You may give authority to maintain listboxes to one individual in each department or to all users. You may also decide to restrict access to maintaining listboxes as a System Administrator task. It is suggested that you setup Validate and Mandatory (Forced Entry) attributes on listboxes prior to activating those features in System Options. Default is another listbox attribute that is available. Keying a value in the Default prompt with Validate and Mandatory set to N (for No) will automatically enter that data into the data field. The user can choose another value, if desired, but the default will be used if no other value is chosen. To be clear, you can use Validate or Mandatory singularly or in combination using Y (for Yes) in each, however, if both are set to N (for No) and you key data in the Default prompt, the default data will be used. You can not use Validate and/or Mandatory plus Default.

Note: Listboxes are available for data fields only with the exception of the Code activity field in ActionWare on the activity panel. That activity field can have a listbox created for it but the attributes of Mandatory (Forced Entry), Validation and Default are NOT available.

Creating Listboxes:

To create a listbox, start in the database in change mode (press C twice) - place the cursor on the desired field press F4 to display the listbox and another F4 to display the listbox maintenance window. All listbox values must be alphanumeric. You must be authorized for Listbox Maintenance via System Options before you can create listbox values. The listbox maintenance window looks like this: (our example is data field TT1 labeled Type of Telephone).

Heading: Field TT1- Type of Telephone

Validate Data Y/N:. Y ...........Force Entry Y/N:. N ........................OR

Default: GEN

Add, change or delete entries, press Enter

 GEN... General
 DIR ..... Direct
 FX1..... Fax
 FX2 .... Alternate fax
 TLF .... Toll Free
 ALT......Alternate phone
 CEL ....Cell Phone
 PGR.... Pager
 HOM ... Home
 VML .....Voice Mail Only

F6=Add above cursor ..... F11=Sequence ....... F12=Cancel
F17=Use existing ................................................... F19=Reset

Keeping in mind the length of your data field type the values that you want for the listbox followed by their descriptions. Our example data field, TT1 - Type of Telephone is 3 characters long. Knowing the length of the field means that you would know that your listbox values could be no more than 3 characters long to fit in the data field. That also means that whatever you type after the 3 characters would NOT appear in the data field should it be chosen from the listbox. In our example we have typed descriptions to explain the type of telephone codes.

A word or two about example data field TT1, to explain how it is used as a companion
to field TL1. This data field appears just before a 20 character telephone field that contains
the actual telephone number. Using TT1 for data field TL1 (telephone number field) means
that you can use space much more efficiently in the database because the "label" for the
telephone number is stored in data field TT1, allowing for a mix and match of data for type
of telephone in the available telephone data fields. If you don't use a field like TT1 for
such data you would have to have one data field for each type of telephone and that would
take up most of a panel considering the varied types of telephone numbers people and
businesses have now a days.

If you were creating a listbox for a 15 character field you would need to use a special character (a semi-colon) to let the ActionWare program know where the value ends and the description of the value starts on the list. There are two special characters recognized by ActionWare for this purpose. They are:

  1. a semi-colon (.;.), if you use a semi-colon ActionWare inserts the value up in the semi-colon into the data field keeping any existing data in the field, the value in the listbox is now first in the data field. This is useful when you want to have more than one value in a field at a time. This special character after the value in the listbox will allow you to also type a description of the value that would not be included in the update to the data field. Very useful for long data fields with short values and long descriptions. You don't really have to have a value to use a back slash, many ActionWare customers use listboxes to display information about the field to the user. Using a back slash in front of such information will ensure that the text of the information doesn't get inserted into the field by accident when the user presses enter to close the listbox.

  2. a back slash (.\.), if you use a back slash ActionWare overlays the existing data in the field. This is actually how all listbox values work, they overlay existing data.

Adding More Listbox Entries

You can create as many entries in a listbox as you want as long as you insert one entry per line. If you need more lines, place your cursor below the last entry but before the last line in the listbox. Press F6 to add a line above the cursor 

Resequencing Listboxes Values

Listbox Values are displayed in the pop-up window in the order in which they are entered. You can however resequence existing entries using F11. This function key will open a space next to each value entry per this example: 

Heading: Field TT1- Type of Telephone

Validate Data Y/N:. Y ...........Force Entry Y/N:. N ........................OR

Default: GEN

Add, change or delete entries, press Enter

.____10..... GEN... General
.____20..... DIR ..... Direct
 ____30......FX1..... Fax
 ____40......FX2 .... Alternate fax
 ____50......TLF .... Toll Free
 ____60......ALT......Alternate phone
 ____70......CEL ....Cell Phone
 ____80......PGR.... Pager
 ____90......HOM ... Home
 ___100.......VML ....Voice Mail Only

F6=Add above cursor ..... F11=Sequence ....... F12=Cancel
F17=Use existing ................................................... F19=Reset

Change the numbered values next to the listbox values to resequence the entries, press enter to resort the values and save them in the new sequence. To be clear, there is a one key index for the user on listbox values, that is not the same as changing the sequence. However, knowing that the one character index is an attribute of a listbox might mean that as a System Administrator that having all entries completely alphabetized would not be particularly necessary.

Deleting Listbox Values

To delete listbox values, use the delete key to remove all the information from the line that you wish to delete. Then press Enter, and the line disappears. ActionWare ignores blank lines.

Sharing and Resetting Listboxes

Listbox values are attached to the data field where first created, however, often times many data fields require the exact same listbox values. For this reason you can "share" listboxes between data fields. To share a listbox with two or more data fields, open the listbox to be shared (in change mode press F4 twice), press F17 Use existing. The database design is displayed so that you can choose which data field to "share" the with the existing listbox. Locate and position your cursor on the target data field, press enter, to share the listbox. You can share listboxes with multiple data fields over and over. This feature saves time if the values in the listbox are required by several data fields.

To reset a shared listbox, open the listbox that is to be reset, (in change mode press F4 twice), press F19 Reset to complete the process.