Creating a pre-filter with data from another table

madpato

Member
Hello

I need to make a prefilter which needs to read the data of another field on other table Something like:

Check if the field "activa" on table A equals 1 then show the entries of the list. My problem is that i cant find a way to know how to obtain the value of this other field in the other table. I was looking at the prefilter query option and something like:

SELECT * FROM `tns_generaciones` WHERE `activa` = 1

Might be of help but then i dont know which field to ask on the list's fields dropdown. It might sound confusing but im here to answer any questions. Thanks.
 
There must be a relation between your list (table) with the prefilter and tableA.

So which one? e.g. list-element2 = tableA-columnx
In this case you could do (add a prefilter, not the prefilter query option)
WHERE field: element2
condition: IN
value: SELECT columnx FROM `tns_generaciones` WHERE `activa` = 1
Type: query
 
Tried something like that but got an error 500 (btw i have other previous prefilters that work fine):

AND: Generacion(Raw) -- The only field that is connected to the other table, its a cascading dropdown
Condition: IN
value: SELECT `activa` FROM `tns_generaciones` WHERE = 1
type: query
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top