Subject | RE: [IBO] TIB_LookupCombo - Join Tables - too ambitious?? |
---|---|
Author | Dion Oliphant |
Post date | 2002-09-12T10:24:06Z |
Hi Helen,
I don't fully understand the KeyDescLinks bit. I have set everything up as
you suggested, but when I insert and click on the ID(this is the
DisplayField for the dropdown) field in the grid during an insert, the
dropdown is populated, but I cannot type into the ID column. Clicking on the
drop down just rolls up the dropdown. I can't scroll the list in the drop
down. As I said, Editing works beautifully.
Many Thanks, Helen
Dion.
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Thursday, September 12, 2002 9:04 AM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] TIB_LookupCombo - Join Tables - too ambitious??
At 08:28 AM 12-09-02 +0200, you wrote:
value that will appear in place of the ID. The purpose of KeyDescLinks is
to match up the field(s) from the lookup table that appear in the dropdown
of the lookupcombo with the output that the user sees.
i.e. Keylinks matches up the lookup key of the parent table with the PK of
the table upon which you are doing the lookup
KeyDescLinks matches up the associated Desc(ription) field with the
description that is delivered by the lookup table.
So this subselect needs to correspond to the SQL for the lookup dataset
currently :
SELECT PERSONID
, FIRSTNAME
, SURNAME
, ID
, TitleId
, Initials
FROM PERSON
...and the subselect would be something like the following and needing to
be aliased because of the join:
....
,(SELECT PERSON2.SURNAME||', '||PERSON2.TITLEDID||' '||PERSON2.FIRSTNAME|
FROM PERSON PERSON2
WHERE COVEREDMEM.PERSONID = PERSON2.PERSONID)
AS LOOKUP_DESC
Helen
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
I don't fully understand the KeyDescLinks bit. I have set everything up as
you suggested, but when I insert and click on the ID(this is the
DisplayField for the dropdown) field in the grid during an insert, the
dropdown is populated, but I cannot type into the ID column. Clicking on the
drop down just rolls up the dropdown. I can't scroll the list in the drop
down. As I said, Editing works beautifully.
Many Thanks, Helen
Dion.
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Thursday, September 12, 2002 9:04 AM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] TIB_LookupCombo - Join Tables - too ambitious??
At 08:28 AM 12-09-02 +0200, you wrote:
>Hi,a
>
>My intention is to allow a user to add to the COVEREDMEM table from within
>TIB_Grid. when the user enters an 'ID' in the Person's ID column, theYup. They are totally wrong.
>associated TIB_LookupCombo control must drop down and do an incremental
>search for this ID(not PersonId - which is a gen value). If the value is
>matched, and the user... from here I believe I can handle the various
>scenarios. My problem is the incremental searching. It does not work for
>INSERTING. It works for EDITING! I believe it has to do with the
>KeyDescLinks.
>I get the TIB_LookupCombo to work out of the grid. Anyway,KeyDescLinks -> PERSONID=LOOKUP_DESC
>here are the settings:-
>
>
>LookupDataset:
>PERSON(SQL)
>------
>SELECT PERSONID
> , FIRSTNAME
> , SURNAME
> , ID
> , TitleId
> , Initials
>
>FROM PERSON
>
>KeyLinks -> Person.PersonId=CoveredMem.PersonId
>KeyDescLinks -> Person.ID=id <----- WRONG
>OrderingItems -> ID=ID[....]
>OrderingLinks -> ID=1
>KeySource -> dsCoveredFamMem
>
> ,(SELECT IDNo, you have this wrong. You don't subselect the ID field, but the output
> FROM PERSON
> WHERE COVEREDMEM.PERSONID = PERSON.PERSONID)
> AS LOOKUP_ID { I believe this is needed for the KeyDescLinks }
value that will appear in place of the ID. The purpose of KeyDescLinks is
to match up the field(s) from the lookup table that appear in the dropdown
of the lookupcombo with the output that the user sees.
i.e. Keylinks matches up the lookup key of the parent table with the PK of
the table upon which you are doing the lookup
KeyDescLinks matches up the associated Desc(ription) field with the
description that is delivered by the lookup table.
So this subselect needs to correspond to the SQL for the lookup dataset
currently :
SELECT PERSONID
, FIRSTNAME
, SURNAME
, ID
, TitleId
, Initials
FROM PERSON
...and the subselect would be something like the following and needing to
be aliased because of the join:
....
,(SELECT PERSON2.SURNAME||', '||PERSON2.TITLEDID||' '||PERSON2.FIRSTNAME|
FROM PERSON PERSON2
WHERE COVEREDMEM.PERSONID = PERSON2.PERSONID)
AS LOOKUP_DESC
> FROM COVEREDMEM....
>
> JOIN PERSON
> ON (PERSON.PERSONID = COVEREDMEM.PERSONID)
Helen
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/