Field Filtering

so im using field filtering as a variable in my query.
i specified the field to display all values when used as a field filter as in the image shown but for some reason it doesnt list values at the query side …still shows none instead of category

Capture1

i have tried using different query and different tables but still no changes

@anonymous The Field Type has to be one of the listed types, as noted in the documentation:
https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#creating-sql-question-filters-using-field-filter-variables

thanks it worked

so it works as in the values displays
but when i run the report, i get this error

ERROR: invalid reference to FROM-clause entry for table "table_name" 
Hint: Perhaps you meant to reference the table alias "table_alias". Position: 2785

@anonymous Without seeing your query, it’s difficult to know, but something is wrong with you FROM-clause

Query throwing the Error:

Select * 
from orders ord
left join subcategory sc on sc.id = ord.category 
left join customers cus on cus.id = ord.requester
left join customers cu on cu.id = ord.assignee
where  ord.create_date::TIMESTAMP::DATE >= {{start}} and 
ord.create_date::TIMESTAMP::DATE <= {{end}}
and  ord.department = {{dept}}
order by ord.id desc

if i should take out the dept variable and run the below query, it runs perfect

Select * 
from orders ord
left join subcategory sc on sc.id = ord.category 
left join customers cus on cus.id = ord.requester
left join customers cu on cu.id = ord.assignee
where  ord.create_date::TIMESTAMP::DATE >= {{start}} and 
ord.create_date::TIMESTAMP::DATE <= {{end}}
order by ord.id desc

or if i should replace the dept variable with an actual value like below , and supply the date varaibles, the query also runs perfect.

Select * 
from orders ord
left join subcategory sc on sc.id = ord.category 
left join customers cus on cus.id = ord.requester
left join customers cu on cu.id = ord.assignee
where  ord.create_date::TIMESTAMP::DATE >= {{start}} and 
ord.create_date::TIMESTAMP::DATE <= {{end}}
and  ord.department = 4
order by ord.id desc

the department field is a foreign key from Department table
so i have mapped the values of department field in orders table to the main table (department)

below is the data model for the orders table
so it displays the name of the department but it should use the value(which is the ID , an integer) in the orders table

@anonymous As noted in the documentation, you cannot use table aliases for Field Filters:
https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#the-field-filter-variable-type
And Field Filters should not include the column in the query, since that is automatically inserted by references from the sidebar:
where {{field_filter}}

also applying field filtering on a dashboard is been very difficult for me to do

so i have added a question with columns [product_name, count and created_at] and i want to add a field filter to be used on the date.
but the after i select time range filter from the dashboard , it tells me no “valid columns”
please help asap

Before i add the filter, the image shows the columns

After i add the kind of filter which is time, this is what i get