Cascadingdropdown with no Foreign Key

SteveRL

Member
Hello,
I have a list which has 7 Cascading Drop Downs. Multi select wont work for a number of reasons.

I'm trying to accomplish 7 similar CDD's but between two tables with no direct connection (no foreign key). The tables are related through several joins. I ended up creating a table (based on a view), with a PK comprised of three columns. It works for 1 or 2 CDD's but starts taking a huge performance hit after enabling 3+. With all 7 enabled, the list never responds.

As I said the list I want to reference does not contain the foreign key of the watch element. Is there a way to use CDD with a additional Joins (I'd need 3).

An alternative, I think, could be using the databasejoin element and getting creative with the WHERE clause, using Select's and Joins inside it. However, I'd have to be able to get the real-time value of the watch element, and I'm not sure that's possible. Also would have to have the element refresh when the watch element changed. Any of that possible?
 
In a databasejoin element you can enable "Ajax update" to update your Data-where when an element used as placeholder (=watch element) is changing.
 
WOW that worked great! Many thanks troester :) Performance is good too. I see it helps to know what you're doing!
The only problem I had after your suggestion was that the ordering was doing strange things on the form, and ignoring my sql order by (I'm guessing it builds dynamically after the where i put in?). Anyway I was able to work around that by adding another watch element that helped me show/hide parts of the union.
Thanks again
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top