Subject | Re: [IBO] tib_lookupcombo and dataset containing null values |
---|---|
Author | Geoff Worboys |
Post date | 2001-08-13T12:19:43Z |
> If a lookup key should be NOT NULL, then I don'tThe delete key allows you to deselect. That is, make it so that no
> understand why a TIB_LookupCombo allows to press
> <DEL> for retrieving a NULL value.
lookup record is selected - meaning that NULL will be assigned to the
foreign key column(s) of the main dataset.
So it is not the foreign key that must be NOT NULL, but the primary
key and the descriptive field of the lookup dataset.
The description provided by Helen offers a way of implementing the
lookup so that you can offer a "none" selection if that is really want
you want - in such cases your foreign key could be declared as NOT
NULL so that the user is forced to select something from the lookup -
even if it is the "none" item.
> Since this not Windows standard to work with a comboI can see the merit of your suggestion but I think the major problem
> box, I don't find it user friendly. So I am getting
> asked by my customers how to remove a previously
> chosen selection from a lookup combo.
>
> Ok, it seems that I am the only one with this
> suggestion...
is that it would not be practical to implement. Inserting a dummy
entry into the selection list for a lookup would be a lot of work -
especially allowing for individual tastes that may want such an option
forced to the top, the bottom or perhaps within the sort order. At
the moment the lookup control works using a standard IB_Grid to
display the list. For it to support a non database entry would mean
building a specialised display grid just for this control. Also,
given that the lookup may be over a dataset of many thousands of
records and that IBO can setup refined incremental searching so that
it may not even see the top or bottom of the dataset, it is difficult
to see how the idea could be implemented efficiently.
Personnally I dont like the way the Windows combobox works anyway,
which is why I built my own - so yes a lot comes down to individual
tastes. If your lookup is only small, you do have the option of
loading the lookup values into a combobox and controlling the process
yourself (or at least to the limited extent provided by the Windows
API).
Geoff Worboys
Telesis Computing