SOLVED!!! Prefilter with calc element to view own related data

stekir

Member
I'm still hanging on my problem with prefilter {$my->id}
My first thread about this theme is here. Since then, I've made a new setup with the internal site.
Actual I try it on this way, but without the result I want to have..

In the first list adressbuch I have a calc element Name_komplett from two field elements adressbuch___Teilnehmer_Nachname and adressbuch___Teilnehmer_Vorname
this is the PHP Code:
return "{adressbuch___Teilnehmer_Nachname}, {adressbuch___Teilnehmer_Vorname}";
in this list there is also a user element set to name. The Joomla users are always set name, prename and can't be changed by users.

In the second list protokolle (table protokolle) I have a databasejoin element name to the list adressbuch with a linked label {thistable}.Teilnehmer_Nachname,', ',{thistable}.Teilnehmer_Vorname

Error 1:
I created a new list Meine Protokolle related to the table protokolle and joined it with the list adressbuch, row name to Benutzername (user). When I open the list there are wrong or no names combined to the user.

Error 2:
When I make a prefilter with user {$my->id}, so the logged in user can only see the entries related to him, the list shows nothing.

Can someone tell me where I have the logical error.

Thank you very much!
Stephan
 
in this list there is also a user element set to name
The user element is always storing the Joomla userID (e.g.472), "set to" is only what is shown to the user
Same with {$my->id}: this is the Joomla user ID
So a prefilter on your-user-element EQUALS {$my->id} should do.

List joins in Fabrik: one "leg" must be a primary key
You may set the dbjoin protokolle.name to adressbuch with value = id[recommended] and the concat label
Then you can join protokolle.name to adressbuch.id
 
YES!!!!! I've made it!!! I can't say how happy I am! Thank you troester!

The solution was the join protokolle.name to adressbuch.id. The prefilter is set adressbuch.username {$my->name}

That simple... ;-)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top