The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Create Filter Links as in "Last 7 Days"

Labels

This Discussion is public

Notifications

Like so often, I started out looking here in the forum for what I was trying to do. This time I didn't find a good reference to my exact scenario, so I decided to share it here.

My Goal:
A set of links in my view that look and work something like this:

All | Last 7 days | Last Month | Last 3 Mo. | Last 6 Mo.

HTML in the view (Before Content):

<a href="?all=true">All</a> | <a href="?lastweek=-7+days">Last 7 days</a> | <a href="?lastmonth=-30+days">Last Month</a> | <a href="?lastthreemonth=-90+days">Last 3 Mo.</a> | <a href="?lastsixmonth=-120+days">Last 6 Mo.</a>

Filter Entries (Advanced Settings):

My_Date_Field is "Greater than or equal to" [get param="lastweek"]
My_Date_Field is "Greater than or equal to" [get param="lastmonth"]
My_Date_Field is "Greater than or equal to" [get param="lastthreemonth"]
My_Date_Field is "Greater than or equal to" [get param="lastsixmonth"]

Note:
For the "All" link, I just made up a parameter but didn't create a filter for it since I didn't want it so affect any filters, just show all results. The view ignores it.

Hope this helps someone searching on this down the road... enjoy!

Thanks for sharing. And thank you for your post about graphs. I was looking into that some more the other day and it's very useful.

Discussion closed.