Views are a key feature in SharePoint. They allow you to display data in various ways according to your needs. The ad hoc filters on lists and libraries can be used to slice and dice data in several ways, but the process would need to be repeated each time you visit the list or library. Views on the other hand, can be set up to quickly switch between pre-configured filter and sort options as well as many other parameters. You can even use the ad hoc filters in conjunction with views and get the best of both worlds!
First, we will see how to create a view using the ad hoc filters as a starting point. In this example, we have a list of clients that we want to sort by the company field, group the time zone field and then filter by the active client field.
1. Click the column you wish to group by, in this case the time zone, and select “Group by Time Zone”:
2. Next click the column you want to sort by, in this case Company, and select “Ascending”.
3. Click the filter icon in the top right of the library and click the check boxes for the values for the fields that you want to filter by. Note that adding filters this way will use the “contains” logic, so selecting multiple values will show items that have any of the selected values. In this example, we are going to check “Yes” under “Active Client?”.
4. Now in the view selector/menu, choose “Save view as”
5. Name the view and click “Save”
Now you can easily switch to the view you just created using the view selector. You can even set it as the default view so that everyone who comes to the page sees it right away. There are several other features that views have as well. To access these, go to “Edit current view” in the view selector / menu.
On this screen you will see all the other options for configuring views. Here are some useful features available:
- Choosing which columns to display and in what order. You will also notice that several built columns from SharePoint can be added here to, such as ID, Created, Created by, etc.
- Sorting by up to 2 columns
- Filtering with more options, such as different logical operators, dynamic values [Today] and [Me], as well as choosing “and/or” logic with multiple filters
- Group by with additional options, such as choosing whether to show groups expanded or collapsed by default
- Totals for numeric columns and count values
- Showing flat or folder structure
- Setting item limits
When using the “Export to Excel” feature, the current view is what is exported, so you can use views to control what is exported and reduce the amount repetitive work needed to create reports in Excel. The current view is also used when using the “Quick edit” feature, so you can edit relevant fields more easily.
Another great feature of views is that you can use them for web parts on other pages. For example, you could create a view on an issues list that shows the top 3 priority issues still open that are assigned to the current user (sort by priority, filter by status and “assigned to is equal to [Me]”, limit number of items to 3). Another useful dynamic view for web parts would be a web part showing all items checked out by the current user (filter by “checked out to is equal to [Me]”). The sky is the limit when creating and using views!