Passing Date param from dashboard into link fields


(Shaun Walters) #1

Seems like it should be simple. I have a dashboard with a date filter on it of type date and the filter name is ReportDate. This filter affects an underlying filter: date_filter on my view and so that is what is chosen from the drop-down in the ReportDate menu for each of the looks on my dashboard that also reference explores from that view.

What I’d like to do is provide some interactivity via the link field on some dimensions. I can get other filters to successfully pass through via the {{ _filters[view.dimension] | url_encode }} syntax but I cannot seem to find a permutation of &ReportDate={{ something }} to properly setup the url to carry this filter around as it is not directly accessing a column in the view.

Guidance?


(quinn.morrison) #2

Hi Shaun,

Thanks for reaching out. It sounds like we will need to edit that dashboard filter to make it type: field, and map to the filter field we have defined in our view file. Once we’ve done that, our link parameter will look like this:

url: "/dashboards/2?ReportDate={{_filters['view_name.date_filter'] | url_encode }}"

Let me know if this works for you!

Thanks,
Quinn


(Shaun Walters) #3

This solutions works, thanks!