I've entered a lookup field to a calendar list that corresponds with the values in a list of links. I would like to show only calendar entries on the web part that correspond with the selected link. How can I select only the entries that contain the value of the selected link in the lookup field?
-
As my question (sharepoint.stackexchange.com/questions/90391/…) has been marked as a duplicate of this one, I wanted to ask if you've found a solution? I'm trying to solve it by setting the CSS display property for the events through jquery.– PhilippeCommented Feb 13, 2014 at 12:03
5 Answers
Filters cannot be associated with a calendar view. Since the calendar view of a list will not support web part connections.
You could use a filter web part:
http://office.microsoft.com/en-us/sharepoint-server-help/work-with-filter-web-parts-HA010033786.aspx
If the filters are not changing you could also create the specific views in the calendar to filter those values, and point the links to the URL of the views.
-
Thanks, we have the Standard Edition so it looks like a filter web part is not an option for me. Is there another way? It seems like a simple thing to do.– nfwCommented Nov 13, 2012 at 18:32
Anand is correct, you cannot add a filter web part to a calendar view. You can only add a filter to a list view.
However, you can use a filter web part on a list view of calendar events (e.g., the "All Events" view)
The calendar view shows this message.
I don't think there is a simple, out-of-the-box way to do this, however, there may be a workaround.
First, is the list of links that may be selected relatively static? If so, you could create a separate view for each link and your drop-down could control which view is displayed.
Alternatively, you could customize. You could create a calculated column that concatenates the title of your calendar event with a delimiter (such as ||) and the value of the lookup field. On the calendar view settings page in the "Calendar Columns" section you would change the "Title" fields to the calculated field you created.
Now if you look at your calendar you will see your events with the Title, the delimiter, and then the lookup field value. Next you would add some jquery to the page via a CEWP that would locate all the events on your page, split the string on the delimiter, check the lookup field value against the value of the web part selected value, and if necessary hide the event if it does not match.
I just recently did something close to what Chloraphil suggested based on this post:
https://crm.webfletch.co.uk/posts/filter-sharepoint-calendar-view
-
-
My issue was that I have a time off calendar and I wanted to be able to filter it by department.The link I showed was able to do that. If one were to better understand what is happening with javascript in that tutorial, they could adapt it in a more customized way. Commented Nov 26, 2019 at 16:08