Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Browse Table Filter Options Topic is solved
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Browse Table Filter Options
Never mind, I've got the drop-downs to appear--now I'm on to editing the SQL. Can you tell me where I need to edit the SQL?
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Browse Table Filter Options
[quote="Alohajoe5"Can you tell me where I need to edit the SQL?[/quote]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Browse Table Filter Options
kev1n wrote:[quote="Alohajoe5"Can you tell me where I need to edit the SQL?
Thank you. I added the JavaScript to create dropdowns for indexes 3, 4, 5, & 9. These correctly populate. I've now edited the SQL to read:
Code: Select all
SELECT * FROM Channels; //Existing statement
SELECT * FROM zzzzsys_object
JOIN Channels ON zzzzsys_object_id = theid
JOIN zzzzsys_tab ON zzzzsys_tab_id = sob_all_zzzzsys_tab_id
JOIN zzzzsys_form ON zzzzsys_form_id = syt_zzzzsys_form_id
WHERE
((sob_all_type = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
AND
((sob_input_type = '#nuBrowseTitle1_dropdown#' AND LOCATE('#', '#nuBrowseTitle1_dropdown#') <> 1 )
OR '#nuBrowseTitle1_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle1_dropdown#') = 1)
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Browse Table Filter Options
It has to look like this. Replace the field in red with your field name (in your case the field name of column 3)
SELECT * FROM Channels
WHERE
((sob_all_type = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
SELECT * FROM Channels
WHERE
((sob_all_type = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Browse Table Filter Options
So my total statement now looks like this:kev1n wrote:It has to look like this. Replace the field in red with your field name (in your case the field name of column 3)
SELECT * FROM Channels
WHERE
((sob_all_type = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
Code: Select all
SELECT * FROM Channels;
SELECT * FROM zzzzsys_object
JOIN Channels ON zzzzsys_object_id = 5cbF608f24b3851
JOIN zzzzsys_tab ON zzzzsys_tab_id = sob_all_zzzzsys_tab_id
JOIN zzzzsys_form ON zzzzsys_form_id = syt_zzzzsys_form_id
WHERE
((Word = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
AND
((Type = '#nuBrowseTitle1_dropdown#' AND LOCATE('#', '#nuBrowseTitle1_dropdown#') <> 1 )
OR '#nuBrowseTitle1_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle1_dropdown#') = 1);
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Browse Table Filter Options
FYI, the zzzzsys_object_id that I found, 5cbF608f24b3851, is the number I got by launching phpMyAdmin, opening the zzzsys_object table and ocating the object that is the "run"object for the Channels form that I have.
Further, I didn't notice having any tables/fields named zzzzsys_tab/zzzzsys_tab_id
Further, I didn't notice having any tables/fields named zzzzsys_tab/zzzzsys_tab_id
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Browse Table Filter Options
the SQL statement I posted last didn't contain the zzzzsys_object table.
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Browse Table Filter Options
This is what it should look like:
Note that there is no final semicolon (;)
Code: Select all
SELECT * FROM Channels
WHERE
((Word = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 )
OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1)
AND
((Type = '#nuBrowseTitle1_dropdown#' AND LOCATE('#', '#nuBrowseTitle1_dropdown#') <> 1 )
OR '#nuBrowseTitle1_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle1_dropdown#') = 1)
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Browse Table Filter Options
Ok, now it seems like I'm making progress. For the "word column", for example--when I select "2" from the dropdown, the pagnation does indicate that I should be looking at a subset of records (goes from page 1/2060 to page 1/742), however the table displayed does not change to only display the records with 2 in the column. Also, selecting anything in the "type" dropdown does not further reduce the number of records--regardless of whether or not they are displayed.kev1n wrote:This is what it should look like:
Note that there is no final semicolon (;)Code: Select all
SELECT * FROM Channels WHERE ((Word = '#nuBrowseTitle0_dropdown#' AND LOCATE('#', '#nuBrowseTitle0_dropdown#') <> 1 ) OR '#nuBrowseTitle0_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle0_dropdown#') = 1) AND ((Type = '#nuBrowseTitle1_dropdown#' AND LOCATE('#', '#nuBrowseTitle1_dropdown#') <> 1 ) OR '#nuBrowseTitle1_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle1_dropdown#') = 1)
Thanks for the help