list filter and dbjoin

arie

Member
Hi,
I have a bug on all Fabrik lists.

I have a list with a specific prefilter applied. This list renders only donors that belong to the logged in user.
I have a dbjoin element (that represents the name of a donor); under Filter tab settings Filter type = Field.

On the list filter, if i enter the id (not the name) of a donor that doesn't belong to the logged in user, the filed render the name of that donor!
1/ after filtering, this field should not render the name but the id
2/ the field should not render a donor that isn't belong to the logged in user

Thanks
 
A dbjoin element is not going to a Fabrik list (with e.g. a prefilter) but to the database table directly.
If you want to show "prefiltered" values/labels only you must "repeat" your prefilter in the dbjoins' "Data - where" part, something like

where {thistable}.your-user-column = {$my->id}
 
A dbjoin element is not going to a Fabrik list (with e.g. a prefilter) but to the database table directly.
If you want to show "prefiltered" values/labels only you must "repeat" your prefilter in the dbjoins' "Data - where" part, something like

where {thistable}.your-user-column = {$my->id}


Hi, I forgot to mention that I already have done that (see the attachment) by using the SQL joins area.
BTW, this field is rendered as a filed and not a dropdown because I need to display the name of the donor.
 

Attachments

  • Capture d’écran 2014-07-29 à 15.53.49.png
    Capture d’écran 2014-07-29 à 15.53.49.png
    30.7 KB · Views: 375
how & where is $my->assocation_id being set?
Generally $my->foo will only contain fields from the jos_user table So unless you are doing something custom elsewhere I would imagine that the data is empty and thus the query to populate the database join will fail
PS If this is on the copieprod site, like I said in my previous post, I couldnt log into the admin to take a look
 
I know but I added a custom field into the user table. In that way, I can prefilter on that field. So no, this filed isn't empty.
Have a look on "mysite" section
 
ok so there are around 200 database join elements, which one contains the prefilter? Please give full details of exactly where I can observer the issue.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top