cascading dropdown

Hi!

I've got two db tables.

table1 (id1, desc1, id12)
table2 (id2, desc2, id12)

I've got a database join on table1 with value id1 and label desc1.
I'd like to have a cascadingdropdown on table2 with value id2 and label desc2.

The problem is that I want to see in the cascadingDD only the elements
where table2.id12 = table1.id12 (that is not the id of the table1).

Is It possible to have this result in fabrik?


Thank You.

Manuela
 
Hi!

I've got two db tables.

table1 (id1, desc1, id12)
table2 (id2, desc2, id12)

I've got a database join on table1 with value id1 and label desc1.
I'd like to have a cascadingdropdown on table2 with value id2 and label desc2.

The problem is that I want to see in the cascadingDD only the elements
where table2.id12 = table1.id12 (that is not the id of the table1).


Manuela

Are you using the "Joins where and/or order by statement (SQL): property of the Database Join rendered as Dropdown? If not, look at the floating help for it then you can apply a join there and filter the list as you would like.
 
I'm thinking that you must be using a dbjoin element type (plug-in) for this. So, first, just get values into that dbjoin without filtering and get that to work (you will have lots of items in the list that you don't want but that is the first step to make sure the other settings are correct). Once you have then working, then add the "Where" clause to the properties of that dbjoin element to filter it down.

Then on the elements for table2 set the properties of the "Joins where and/or order by statement (SQL)" property to:
LEFT JOIN `table2` ON `table2`.`id12` = `table1`.`id12`

If the join above doesn't work, use PhpMyAdmin and develop a SQL query that works. Then use what you develop knowing it is proper SQL syntax and copy it into the appropriate field in the element's definition screen.

Now, if you mean to filter table 2 so that the only items appearing in the drop down are determined by another drop-down that the user chooses, then you need to do this with a cascading drop down plug in (not a dbjoin with a render-as drop down). The cascading drop down plug-in (CDD) is a very nice and useful plug in that is available onlyt to Bronze level subscribers and it does not come with the standard Fabrik installation (you have to add it). I realize that sometimes you want to make sure something works before subscribing but If the other things you see in Fabrik impress you, then I propose that it will be well worth your $ to 'take a chance' by investing in the bronze level subscription and try out the CDD plug-in. I use it often and this alone makes Bronze a bargain.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top