Pre-filter list for users with multi-selected DBjoin list

Status
Not open for further replies.

Bren

Member
Hello all.
I have a list with a fixed amount of records (52 rows). I then have a manager access level user, who will be assigning 1 or more of these rows to multiple other registered users, via a jUser form user list with an extra DBjoin multi-select element. Now I need to create a menu item with a pre-filtered list that handles displaying these assigned rows of the current logged in registered user. Not exactly sure how to set up the pre-filter in this fashion... Any suggestions?
Thanks in advance.
 
Multi-select dbjoins are in an additional table your-main-table_repeat_your-dbjoin-element-name (childlist_repeat_dbjoin_multi in my example)
You can add a prefilter like
WHERE id IN
select parent_id from childlist_repeat_dbjoin_multi where dbjoin_multi={$my->id}
Type=Query
 
Hi Troester.
So, I tried your suggestion and so far the list has been returning no rows, though I have 3 items selected in the multi-dbjoin. Maybe I have something slightly off. Please see the attached snippet, which includes the value below.
select id from bw_registration_repeat_condo_unit where condo_unit={$my->id}
See anything I may have missed?
Thanks in advance.
 

Attachments

  • Snippet - Pre-filter.PNG
    Snippet - Pre-filter.PNG
    17.3 KB · Views: 75
OK, so, I should have said that I also tried select parent_id, which I just tried, again, and it still returns no records. In case I'm still messing this up, please see the 6 attached snippets. Hopefully this helps connect the dots on where I may have messed up. I'm temped to go into phpAdmin to look at the hidden DBjoin child table to try to wrap my brain around this, but I feel like I may just get more confused. It seems like I'm getting close though. What do you think?
Thanks in advance.
 

Attachments

  • Snippet - Pre-filter.PNG
    Snippet - Pre-filter.PNG
    28.8 KB · Views: 82
  • Snippet -Condo_Units List.PNG
    Snippet -Condo_Units List.PNG
    8.4 KB · Views: 75
  • Snippet -Registration Users list.PNG
    Snippet -Registration Users list.PNG
    16.2 KB · Views: 77
  • Snippet -Condo_Units DBjoin.PNG
    Snippet -Condo_Units DBjoin.PNG
    35.9 KB · Views: 74
  • Snippet -Registration elements.PNG
    Snippet -Registration elements.PNG
    68.5 KB · Views: 71
  • Snippet -Condo_Units elements.PNG
    Snippet -Condo_Units elements.PNG
    47.8 KB · Views: 71
who will be assigning 1 or more of these rows to multiple other registered users
As I said:"and assuming condo_unit contains the userID"
But your condo_unit is not going to #_users and the numbers don't look like Joomla userids.

So obviously {$my->id} can't do.
I don't know how your value in condo_unit is related to the Joomla userid.
 
The Registration list is the Joomla user list synced via the Fabrik Juser Form Plugin. The matching id element in this list would be bw_registration___userid. Does this help connect the dots?
Thanks in advance.
 
It took me going into phpAdmin and wrapping my brain better around this better. After some trial & error, I finally got the following pre-filter value to work. Thanks for your suggestions, Troester. I appreciate.

select condo_unit from bw_registration_repeat_condo_unit where parent_id=(select id from bw_registration where userid={$my->id})
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top