Show data from a linked table from its linked table

Philipp

Member
Hi,

Somewhere I read about it, but cann't find it again

i.e.:

Table Album
Table Songs
Table Singer

Songs is linked with Album
Singer is linked with Songs

I would like to show the name of the singer (but not only the rec-no) in a select_multiple_checkbox

Snap_2014.05.03_23h52m33s_001_.png


let's say: ddb-fan instead of 2

Unfortunately I cann't follow your helptext about :
Each table can have more than one linked table; in this case you can add additional table and foreign key field names using the separator. It is also important to highlight that, in this example, id_album in songs should be a select_single field with values driven from albums (see field type for information about select_single fields).

Is there somewhere an example ?

Best,
 

eugenio

Administrator
Staff member
Hello,
the text you reported is related to master/details view, not to select_single/_multiple.
 

Philipp

Member
sorry

this are 2 questions in 1 mail, my mistake.
Do I have to split it up ?

both questions need an answer

rg,
 

eugenio

Administrator
Staff member
I thought the second part was related to the first one.
You cannot set up a select_multiple to make a multiple join on several tables, if this is what you asked, it it isn't, please explain more in details the case.
 

Philipp

Member
I hope this is the correct description:

Table 1: Booking

Table 2: Member

Table 3: Camera

Member contains a single_select-field (field4) with Camera as primary-key-table
Booking contains a single_select-field (member) with Member as primary-key-table

with linkfields field1~field2~field3~field4 (fields of Member) in Booking.member

I get this:
Snap_2014.05.03_23h52m33s_001_.png


with linkfields like field1~field2~field3~field4.field3ofCamera~field4.field5ofCamera
I would like to have
Althaus - Philipp - 8006 Zürich - Olympus - OMD-EM1

the last 2 values are data from table Camera, just to show the camera-infos
and would be very helpful for the user to select the correct record, otherwise I have to work with (hidden) views ?!

Thanks,
 

Philipp

Member
part 2:

Unfortunately I cann't follow your helptext about :

Each table can have more than one linked table; in this case you can add additional table and foreign key field names using the separator. It is also important to highlight that, in this example, id_album in songs should be a select_single field with values driven from albums (see field type for information about select_single fields).

Is there somewhere an example ?

You have to define a seperate field per linked table with only 1 linked table and 1 to n fields, then it works.
More than 1 table with seperator fails.

Best,
 

eugenio

Administrator
Staff member
About your first question, I confirm that it requires a cascade join so you can't show "Olympus" unless you handle it with a MYSQL VIEW.

About your second question: imagine to have a table Albums, you want to add in master/details view both songs (id_song, title_song, id_album) and artists (id_artist, name_artist, id_album); in this case you would have:

Linked items table names: songs~artists
tems table foreign key field names: id_album~id_album

Cheers
 
Top