Subject RE: [IBO] Lookup that changes with another column value
Author Jason Wharton
I think that may not be very feasible.
In the grid it would need to revisit the different query conditions for each
record as it were painted and if the lookup dataset needed to be refreshed
in this process that would take too long.


Jason

> -----Original Message-----
> From: cwbauer2003 [mailto:chuck@...]
> Sent: Monday, March 21, 2005 11:36 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Lookup that changes with another column value
>
>
>
>
> Is it possible to have a lookup combo in a grid such that the
> contents of
> the drop down list change depending on another field in the
> source table?
>
> ie:
> from the master table ibo_query.sql
> SELECT ID
> , COMP_TYPE
> , (SELECT DESCRIPTION FROM COMP_TYPES // this ordinary one works
> fine
> WHERE comp_types.ID=Master.COMP_TYPE) AS C_TYPE
> , PROPERTY_TYPE_ID
> , (SELECT DESCRIPTION FROM PROPTYPES P // this one doesn't
> WHERE (PROPTYPES.COMP_TYPE=MASTER.COMP_TYPE) AND
> (PROPTYPES.ID=MASTER.PROPERTY_TYPE_ID)) AS PROP_TYPE
> ... other unrelated columns
> from master m
>
> The lookup table is:
> CREATE TABLE PROPTYPES
> (
> ID integer not null,
> COMP_TYPE INTEGER,
> DESCRIPTION CHAR(25),
> CONSTRAINT PK_PROPTYPES PRIMARY KEY (ID)
> );
> its sql is just select * from proptypes or I also tried
> select p.comp_type, p.description, m.comp_type
> from Proptypes P, master M
> where (p.comp_type=m.comp_type)
>
> so that the contents of the drop down list are based on what is in the
> comp_type column of the master table.
> Tried a lot of combinations of KeyLinks and SQL but always
> get all rows of
> the proptypes table in the lookup or column not found errors.
> Environment is FB 1.5.2, IBO 43Aa, Delphi 4, Win2000
>
> Any suggestions would be very welcome.
>
> Thanks
> Chuck Bauer
>
>
>
>
>
>
> ______________________________________________________________
> _____________
> 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
> !
> Yahoo! Groups Links
>
>
>
>
>
>
>
>