Tip
of the Month (July 2001)
Removing
Entries From User-Can-Add Dropdowns
Visual
CE's dropdown controls have an optional user-can-add property. If
the property is enabled, users can either pick a value in the drop
down or type in a new/different value.
For user-can-add dropdowns, when the form comes up, the table is
scanned for the new/different values. Then, as the form is used
and the user enters new values, these new/different values are added
to the list. While the form is open, entries are only added to the
list (they are never removed).
So, if you design the form with RED, GREEN, and YELLOW in the dropdown
and some user creates a record with the value VIOLET and another
with PURPLE, both VIOLET and PURPLE will be added to the list. If
you close the form and re-open it, the list is initialized with
RED, GREEN, and YELLOW plus the values found in the records in the
table (VIOLET and PURPLE).
So, how do you get rid of a value? Just remove it from all the records
in the table. For example, if you removed all the PURPLE records
(or changed it to another value), PURPLE will remain on the list
until the form is closed. When the form is closed and opened again,
the list is initialized with RED, GREEN, and YELLOW plus the values
found in the records in the table (VIOLET, but not PURPLE).