Subject Re: [IBO] tib_lookupcombo and dataset containing null values
Author Geoff Worboys
> 1. If I use a dataset from this table containing null
> values, the incremental search doesn't find some records.
> There are others where incremental search works well.
>
> 2. If I use a dataset from this table containing no null
> values, the incremental search works well in all cases.

One issue is that NULL values get sorted to the bottom of the list,
whereas blank string values get sorted to the top. I think that
inside IBO NULLs will be seen (for purposes of incremental searching)
as blank strings which would obviously cause some confusion.

That is; If the buffer is pointing at a null entry the incremental
search will read this as a blank string and attempt to search forward
through the buffer to find the next non-blank value - only to discover
that it is already at the end.

Note that the incremental search may end up at the null entry during
one of the big jumps forward that it does in certain circumstances.
Rather than stepping through the buffer record by record, incremental
search tries to narrow down the search more quickly by making jumps
and then stepping back if necessary. This makes it possible for the
search to hit the null at the end of the buffer before it has searched
all the records in between.

I suspect the solution to your problem will be to setup yours triggers
to ensure that a null value is converted to an empty string - so that
both IBO and IB will sort in the same order.

HTH

Geoff Worboys
Telesis Computing