This topic is locked

SQL on Lookup Wizard in Visual Editor

8/16/2008 4:26:24 AM
PHPRunner General questions
A
Aleix author

Hello;
First; many thanks in advance.
The question is:

In a Drop-Down (Look wizard) can we see in the "Display Fiel" information belong to another table?

If it is possible, Can you tell me a code example?
This is a example that we want to do.
We have 3 Table
TABLE_1; 1 ---> 1 Table _SalesMan

_Sales

Id Sales

Id SalesMan_Choosed

CustomerName

CustomerData
TABLE _2

_Specialist

Id Specialist

Id SalesMan [color=#0000FF](1--->N _SalesMan.Id SalesMan

Specialist
TABLE_3 1 ---> N Table _Specialist

_SalesMan

Id SalesMan

[color=#FF0000]Name

First Name

Id Specialist
We have one Form with this fields.
_Sales.Id SalesMan_Chossed
We want choose a SalesMan specialist in one area, for example "cars"
For that we need a drop down with the names of the all SalesMan specialist in cars.

See all the "Names" of the SalesMan specialist in cars. (Now we see the "Id SalesMan")
WE TRY: But it does not work
Visual Editor

TABLE : _Sales

List Page

Field: _Sales.Id SalesMan_Choosed
Properties

Lookup Wizard - Lookup and put:

Table: _Specialist

Link Field: Id SalesMan
Display Field: Custom It does not work!

SELECT _SalesMan.Name

FROM _SalesMan

INNER JOIN _Specialist ON _SalesMan.Id SalesMan =_Specialist.Id SalesMan
Order by: Select Column

WHERE: Specialist = "cars"
That is, we want see the "Name" of the sales man and this field is in another table, no in the _Sales Table is in the Specialist Table
The question is:_

In a Drop-Down (Look wizard) can we see in the "Display Fiel" information belong to another table?

If it is possible, Can you tell me a code example?
Many Thanks

J
Jane 8/18/2008

Hi,
Unfortunately it's impossible to use fields from different tables as link and display fields for lookup wizard.

A
Aleix author 8/19/2008

Hi,

Unfortunately it's impossible to use fields from different tables as link and display fields for lookup wizard.


Thanks Jane
Are there another way to do that?
Best Regards