Subject Re: [IBO] KeyDescLinks purpose?
Author Geoff Worboys
> What's the idea behind KeyDescLinks?

AFAIK these were introduced purely to support TIB_LookupCombo on
grids, although it is possible to use these for other similar
purposes. The values are used entirely internal to IBO and are not
used to construct SQL.

(Contrast this with MasterLinks. In masterlinks you can usually
support the normal internal synchronisation requirements by just
supplying field=field. However if you intend to use search mode,
where the links are used to construct SQL, it is necessary to use the
full table.field=table.field in order for the search SQL to be

Back to KeyDescLinks...

Imagine you have a grid with 3 columns, on which you have dropped
TIB_LookupCombo in order to edit the middle column. You tab to that
column, select the new value from the lookup and then tab on to next

At this point the record is not yet posted (which may have refreshed
the record from the server). This means the value of the
computed/embedded-select field has not been updated. Since this is
the value being displayed on the grid when the lookup is not focused,
when you tab away from that column it appears that you have not
selected the correct value. You tab back only to find the the
lookupcombo is still showing the value you selected (hopefully :-).

IBO allows you to solve this by defining KeyDescLinks, where


When the lookup dataset changes row and the main dataset is in an edit
mode, then the lookup dataset will update the matched
computed/embedded-select column with the value selected field
specified from the lookup dataset.

> KeyDescLinks=>keyset.showfield=master.compfield
> "master.compfield not found".
> KeyDescLinks=>keyset.showfield=compfield
> in the keyset dataset solves the problem.

It seems that embedded selects do not have a relation name. I have
discovered this the hard way myself :-) Perhaps this is supposed to
be obvious but it is something I tend to forget. Of course, if the
embedded select was from a true computed column or view, then it would
have the relation name matching all the other fields from the same

PS. If you use TIB_LookupEnh from the EnhComponents then the
KeyDescLinks are required even when you are not using a grid in order
to support shared lookup datasets.


Geoff Worboys
Telesis Computing