Subject Re: [IBO] Lookup combobox
Author Paul Vinkenoog
Hi Alfred,

> Can anyone please give me an idea on how to set up TIB_LookupCombo
> to display the values of the parent table, but on dropdown show all
> the values in the lookup table. Im looking for something like
> LookupSource?

What you have to do is set up a Lookup *query*. This query must
provide the lookup values and must also be able to link to the parent,
usually (but not necessarily) through some common ID.

You link the lookup query to the parent (the KeySource set) by setting
LookupQuery->KeySource to the parent's DataSource, and setting the
KeyLinks of LookupQuery to something like this:

Gremlin_ID=MyMasterTable.Gremlin_ID

Often, you want to give the user a choice between names or
descriptions, not numbers. In that case (and if the real link is made
by an ID like above), you also set LookupQuery->KeyDescLinks to e.g.:

GremlinName=GremlinName

(I didn't use MyMasterTable here because more often than not, the
Name/Desc field in the parent set comes from a joined field or a
subselect. In all cases, on the rhs you must use the name this field
has in the SQL of the parent.)

If you want a more extensive example, you can look in the GSG or look
at my longest posting from August 24 in a thread called "cascade
relations". It's a 3-step outline with the KeySource-Lookup relation
- including the use of LookupCombos - discussed in step 3. Just skip 1
and 2, and with any luck step 3 might still make sense :-)


Greetings,
Paul Vinkenoog