databasejoin - also view from another table?

Status
Not open for further replies.

Kant

Member
I have an "address" table which has a join with an "vereine" table.
I would now like to create a Datebasejoin in a forms, which displays firstname, lastname, Vereine

I tried the following without success:

{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', {table_vereine}.abk
{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', {table_vereine___abk}
 
http://fabrikar.com/forums/index.php?wiki/database-join-element/#or-concat-label-examples

so
{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', (SELECT abk FROM table_vereine....)

Unfortunately did not work that way. Get error 500

But I get the corresponding verein_id displayed.
Do you have to query these with the Vereine table? If so how is that done?

{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', {thistable}.`verein_id`

nachname, vorname - 64 ( Franz, Peter - YCZ )

regards
Oliver
 
Concat should do, what did you try exactly?
Is "table_vereine" the correct table name? Or only "vereine"?
 
Concat should do, what did you try exactly?
Is "table_vereine" the correct table name? Or only "vereine"?

Table Name: vereine

Both tried without success
{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', (SELECT abk FROM vereine)
{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', (SELECT abk FROM table_vereine)
 
You are missing the WHERE part
If the label of your dbjoin is a dbjoin value itself get it's label with
Code (Text):
(SELECT name FROM table2 WHERE table2.id = {thistable}.element)
 
Thank you, that worked

{thistable}.`nachname`, ', ', {thistable}.`vorname`, ' - ', (SELECT abk FROM vereine WHERE vereine.id = {thistable}.verein_id)
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top