0

I am in the midst of creating an employee leave and out calendar/list for a secretary to manage. The different types of outages are leave, sick, late arrival, and early departure. Is there are way to filter the view to show all of these that fall on or over lap for "today"?

I would like to limit the amount of web parts used to display multiple different views to reduce the amount of confusion.

Thanks.

0

If you don't want to use multiple webparts you can use one webpart and filter the list data by passing the filter using query string parameter.

If you want to see or get a sense of how the url is formatted you go to a list page and filter/sort on the columns and see that url is updated accordingly.

Here is the example you can pass filter value

....?FilterField1=Modified&FilterValue1=2016-10-24

  • I am not following you on this, are you suggesting using a "search" type function for this? Sorry I may not be reading your post correctly. – Flat Banana Oct 24 '16 at 15:17
  • I presume you want to filter the list view based on the date/leave type, if so you can do this by manually passing the value to the url. You can also use filter by query parameter webpart to pass the parameter to the webpart using webpart connection. – Dev8055 Oct 24 '16 at 15:42
  • I am assuming you mean use this webpart? [1]: i.stack.imgur.com/lJjrd.jpg . How would I go about adding a query to the list in question? Do you have a reference to this? – Flat Banana Oct 24 '16 at 15:53
  • You have to specify the parameter name (e.g. leaveType) in the webpart and optionally specify the default value (if you want to specify default view for 'leave'). Then in the url pass the value like this '...calendar.aspx?leaveType=sick' – Dev8055 Oct 24 '16 at 15:59
0

The best way I have found to do this was within the views. For events such as leave that may take place today and span a few days or may have started yesterday but go through the current date to a latter date, I sent the views to:

Type of outage -> is equal to -> leave

and

Start date of outage -> is less than or equal to -> [today]

and

End date of outage -> is greater than or equal to -> [today]

This solved my issue with displaying only the correct dates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.