Subject Re: Is this a limitation
Author Mihai Chezan
> select m.*, d."Name"
> from "customerinvoicerequirement" m left join "customer" d on d.
"Cust
> ID" = d."customerid"
>
> With this kind of sql I have add the "Name" field into the ordering
> links. But this statement doesn't work well when setting up a
> ib_lookupcombobox.
If you want to have the query shown in a grid and to have a lookup
for the client name in the grid then:

The view/edit ib_query:
select
m.*,
d."Name" CustomerName
from
"customerinvoicerequirement" m
left join "customer" d
on d."Cust ID" = m."customerid"
KeyRelation="customerinvoicerequirement"
KeyLinks="customerinvoicerequirement".the pk of
customerinvoicerequirement
OrderingItems=CustomerName=d."Name"; DESC d."Name"
OrderingLinks=CustomerName=1

The datasource linked to the view/edit ib_query:
DataSet=view/edit ib_query

The ib_grid:
DataSource=datasource linked to the view/edit ib_query

The lookup ib_query:
select * from "customer"
or
select "Cust ID", "Name" from "customer" if you only want
Name from customer
KeyLinks="customer"."Cust ID"="customerinvoicerequirement".
"customerid"
KeyDescLinks="customer"."Name"=CustomerName
KeySource=datasource that is linked to the view/edit ib_query

The ib_lookupcombobox droped on the ib_grid:
DataSource=datasource that is linked to the lookup ib_query
DisplayField=Name