How are custom SQL field filters supposed to work?


I’m having trouble understanding what variables of the field filter type are supposed to do. I thought it would create an interactive question-like filter, except on a dashboard.

However it doesn’t seem to do much at all.

This is the query I’m running;

select date, time_run as “Time in seconds”
from f_run_jobs left join d_date on fk_date = tk_date
left join d_tasks on fk_task = tk_task
where date>= CURRENT_DATE - interval ‘30 days’
[[and {{task_filter}}]]

where {{task_filter}} is a field filter variable linked to a dimension field of the type entity name. I have used it as a regular text parameter (i.e. where task = {{task__name}}) and it works fine, but once I set it as a field filter it just seems to return true for all rows. There’s no input or filter widget, neither on the question itself nor on the dashboard, and I can’t link the variable to a general dashboard-level filter like I can with a regular text parameter.

Is this intended behavior? Am I missing something?

thanks in advance

You should be able to link the variable to a dashboard level filter. The only caveat is that you can only use it on the same filter widgets that “entity name” filters can be used by. I don’t recall the rules off the top of my head.

Can you do me a favor and try to link a simple count of rows in whatever table contains the task_filter field gui card to the filter widget you’re trying to link that template to?