Dropdown filter on lists doesn't seem to work with databasejoin which depends on another value

AlexTCGPro

Member
Hey.
I got this element called 'area' that is a databasejoin element and has a where value that depends on another value, 'id_course' in this case.
The list displays all the values correctly, however I want to have a dropdown filter with 'area' values but it doesn't seem to work. The only option it has is always 'All'.
I tested with other lists and yes, it seems that you can't make a dropdown filter with elements that depend on another ones on the same form.
The only filter that seems to work it's field, but that won't do.

Is there a work around or fix for this?
 
You may have to set the "Filter where" to "reset" your "Joins where".
Good day.
I'm not sure how to do that.
My joins are
Code:
WHERE {thistable}.id IN (SELECT areas FROM user_courses WHERE id = '{profiles___id_course_raw}')
I should add the same code in 'Filter where'?
 
No, it doesn't make sense to have such a condition in the filter (what should be replaced here?).
To "clear" this condition something like
1=1
in "filter where" should do (I didn't test)
 
WHERE {thistable}.course = "{currenttable___course_raw}"

Now you can select Area from the {thistable} based on "course" from your current record == {thistable}.course
Then you you must offcourse have a "course" element in both tables and you have to compare (int) with (int) and (vchar) with (vchar).
If {thistable}.course is for example not an (int) value than the following might work:

WHERE {thistable}.course = "{currenttable___course}"
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top