Prefilter Query Misbehaving

nclaypool

Member
I have a list setup that records a series of defaults for each user, this allows them to customize the behavior of my application to their liking. One of these settings specifies which building they reside in so they only have to see records of a few different lists that apply to their building.

Using a pre-filter I'm trying to make a list only display records that match the specified building in the defaults. Here's the data that needs to be compared:
List 1 Field: CENTER
List 2 Defaults Field: MY_CENTER
List 2 User Identifier: USER
Both fields use radio buttons and use the same numbers.

Here's my pre-filter
Field: CENTER
Condition: EQUALS (I've also tried IN)
Value: SELECT my_center FROM user_defaults WHERE user = '{$my->id}'
Type: QUERY
Apply to: Super User while testing

Even though the super user account I'm using for testing has a default building set when I browse to the page where this pre-filter is applied no records are displayed despite confirming there being records that match that building number.

I could sure use your help! I can't seem to figure out why this shouldn't be working.
 
Can you enable Fabrik debug, append &fabrikdebug=1 to the URL to the list, and paste the 'getData' query here.

-- hugh
 
Can you enable Fabrik debug, append &fabrikdebug=1 to the URL to the list, and paste the 'getData' query here.

-- hugh

Well, this is interesting.

Code:
SELECT DISTINCT `children`.`datetime` AS `children___datetime`, `children`.`datetime` AS `children___datetime_raw`, `children`.`id` AS `children___id`, `children`.`id` AS `children___id_raw`, `children`.`visible_id` AS `children___visible_id`, `children`.`visible_id` AS `children___visible_id_raw`, `children`.`center` AS `children___center`, `children`.`center` AS `children___center_raw`, `children`.`date_enrolled` AS `children___date_enrolled`, `children`.`date_enrolled` AS `children___date_enrolled_raw`, `children`.`exit_date` AS `children___exit_date`, `children`.`exit_date` AS `children___exit_date_raw`, `children`.`funding` AS `children___funding`, `children`.`funding` AS `children___funding_raw`, `children`.`regularly_attended` AS `children___regularly_attended`, `children`.`regularly_attended` AS `children___regularly_attended_raw`, `children`.`county` AS `children___county`, `children`.`county` AS `children___county_raw`, `children`.`birthdate` AS `children___birthdate`, `children`.`birthdate` AS `children___birthdate_raw`, `children`.`race` AS `children___race`, `children`.`race` AS `children___race_raw`, `children`.`gender` AS `children___gender`, `children`.`gender` AS `children___gender_raw`, `children`.`annual_income` AS `children___annual_income`, `children`.`annual_income` AS `children___annual_income_raw`, `children`.`print_report_button` AS `children___print_report_button`, `children`.`print_report_button` AS `children___print_report_button_raw`, `children`.`id` AS slug , `children`.`id` AS `__pk_val` FROM `children` WHERE 2 = -2 ORDER BY `children`.`center` ASC

I can see the problem, "WHERE 2 = -2" but I have no idea how or where its getting those numbers. 2 is not the name of the element it should be comparing against and -2 isn't even an option on the radio button its pulling from.
 
Ah, you must be merging repeat joins. Look at one of the previous queries, I can't remember what it's called (not near my computer), but the query should fairly obviously have the where clause in it.

Sent from my HTC6545LVW using Tapatalk
 
Ah, you must be merging repeat joins. Look at one of the previous queries, I can't remember what it's called (not near my computer), but the query should fairly obviously have the where clause in it.

Sent from my HTC6545LVW using Tapatalk

Sadly on this list there aren't any joins or merged data. I am using the "Related Data" section but that's about it.
 
Both I guess. Fill out your My Sites. I'm about to head to the airport, it'll be tonight or tomorrow before I can look.

Sent from my HTC6545LVW using Tapatalk
 
Both I guess. Fill out your My Sites. I'm about to head to the airport, it'll be tonight or tomorrow before I can look.

Sent from my HTC6545LVW using Tapatalk

It says I don't have permission to do that. If I can have your email address I'll send you a secure message with all the URLs and passwords you'll need. I promise not to use it as a direct contact, only to get this information to you securely.
 
OK, well that's why.

Sent from my HTC6545LVW using Tapatalk

Okay I just logged out then logged in from your main site. Maybe I'm looking in the wrong area, I'm clicking on my name, going to "Your Profile Page", and clicking the "Sites" tab.
This is what I get: No sites set up yet, or you do not have permission to view this content.

But there's no buttons or links to add sites???
 
Click the My Sites link to the left of any of your posts. I'm on my phone atm, so don't have the full forum view, but I think that takes you there. Or go to the Joomla site, under You menu.

Sent from my HTC6545LVW using Tapatalk
 
Click the My Sites link to the left of any of your posts. I'm on my phone atm, so don't have the full forum view, but I think that takes you there. Or go to the Joomla site, under You menu.

Sent from my HTC6545LVW using Tapatalk

Wow, sorry about that, didnt even see it. I've added my site, thanks for being willing to give it a look. Have a safe flight.
 
In the frontend there's nothing to see at all, in the backend "Show data" on the children list is throwing "You are not authorised to view this resource."...
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top