WORKING WITH SHAREPOINT VIEWS Author - Chris Poteet @chrispoteetpro http://www.siolon.com Published by Matthew Hughes http://sp365.co.uk This ebook is a guide to SharePoint Views. It has been published on SP365.co.uk
Working with SharePoint Views - Part One One of the most powerful and intriguing abilities of SharePoint are the many ways SharePoint provides for you to display, retrieve and consume information. I believe this is the single biggest reason SharePoint has become the de facto enterprise content management system today. Until another product comes along that challenges Microsoft s innovation in this arena, SharePoint will continue to be the most popular tool for ECM. One of my regular duties in SharePoint implementations is to hone SharePoint to maximize the utility of SharePoint as an information management system for an organization. While SharePoint is powerful completely out-of-the-box, anyone who has worked with product knows that it needs to be tuned to meet the needs of an organization. Microsoft realizes this, and has provided powerful tools to help organizations accomplish this. In this blog you will see many different explanations of tools provided by Microsoft to make SharePoint work for your organization. My series will be about the power of views in SharePoint. The Background: Folders Is All We Have Often when people design digital manifestations of tangible experiences this is called translated realism. Examples include page turning animations in ibooks: the animation is clearly not needed, but the designers of the application wanted to convey the physical experience by duplicating an aspect in the digital translation (the Kindle does not take this route however). In that same category we have the concept of folders. Back when computers were first entering the commercial sector, there was a desire to give users a paradigm that they were familiar with. They chose the paradigm of a filing cabinet. The way most people broke down the individual filing cabinets was through the using of hanging folders. This seemed reasonable, and they went forth on using this paradigm to easy people into the digital age of managing information. While at first this was a good approach, it quickly became evident that the folder paradigm was grossly inadequate to classify digital information. In the physical world it was the best way, but digital information behaves and is consumed differently. SharePoint Views: An Alternative to the Establishment There are few things that are perennially debated amongst SharePoint users and consultants, and I think the folder debate is probably the most common. Some, like myself, have gravitated in an extreme manner away from folders, and others have tried to tow the line between the two. Even though SharePoint 2010 has made improvements in the way folders can be used, I do strongly believe that folders have outlived their translation. SharePoint provides us a unique opportunity to move information, not only out of the local computer, but also into a new consumption paradigm. Through the use of metadata, content types and SharePoint views, the consumption of information can be far more powerful and flexible. My focus in the following posts will be all the intricacies of utilizing SharePoint views. As an additional introduction, I ve created a video visually demonstrating the use of folders and views in SharePoint. I explain how they can be used together, but I also talk about why one is superior over the other. Regardless of your views on this issue I hope the series will prove valuable to you and your users to maximize this incredible feature.
Working with SharePoint Views - Part Two Now that we have some background into SharePoint views, it s time to start dissecting the functionality. In this post we will talk about the experience of creating views, and then we will talk about the options presented to the user after starting the create view workflow. There are two ways to create views inside the SharePoint interface. The first of these is in the breadcrumb. In lists and libraries, the last node in the breadcrumb has a dynamic element that allows the user to change, configure, modify and create views. Types of Views After using one of these actions you will be presented with a screen that list various types of views that can be created.
Let s go through each of these in turn with additional detail not included in the descriptions above. Standard View This is a completely blank view that has all the standard view options. This is the most common type of view that you will be creating, and it is tailored specifically for normal data consumption inside the SharePoint interface. Calendar View This view comes automatically whenever you create a calendar in SharePoint. This view provides monthly, weekly, and daily views into data with these tailored views. Any list or library with a date and time column can use this view. The additional settings necessary to create this view have already been covered on the Get the Point Microsoft blog. Access View The Access view is when you want to use the Access client-side tool to look at and alter information in your SharePoint library. When you use this option it actually creates an Access file inside of the library which is why this view option is not available on lists. Datasheet View The datasheet view is a way to look at the metadata in your list and library to allow easy editing of multiple rows at a time. There are limitations such as an inability to edit managed metadata fields, and it requires a 32 bit version of IE 7/8/9 (for ActiveX and the Access runtime). Remember that any list or library can allow the datasheet view on any existing view; only use this view option if you want it to automatically and explicitly be a datasheet view. Gantt View The Gantt view gives a view into data reminiscent of the Gantt visualization provided by tools such as Microsoft Project. You also need to have a date and time field, and optionally you can use a number column to designate percentage for task completion. You can find more information about this view on the Programming 4 Us site. This view comes automatically on the project task list. Custom View in SharePoint Designer This option is for advanced users who want very fine-grained control over the view. They can customize the XSLT, set conditional formatting, and do other exciting things to your view. Remember that any existing view created in the SharePoint interface can be modified with SP Designer. We will cover this in a later post. Start from an existing view This feature allows you to use an existing view as a template for a new one. This is great when you want to have multiple views but only differ by one property (e.g. different views for countries based on a metadata value).
Working with SharePoint Views - Part Three The time has come to finally unpack the base functionality provided to us in SharePoint views. Thankfully, Microsoft has developed the view functionality to be extremely usable and flexible. The options that we have to work with allow us almost unlimited possibilities at how we look at our information. There are thirteen base options, and in this post we will look at four of them and the remaining options will be covered in subsequent posts. Name, Default View and Audience Here is a screenshot of the first two major options we can set in the view. The first thing you ll need to do is name your view. Adding spaces to the title will add a encoded character (%20) so you can keep it one word and go back and add the spaces, or you could keep spaces and change the URL later. Whichever you choose you want to avoid spaces in the URL portion of the view. The next thing we can choose is whether we want this view to be just for us or made public. Both of these options have corresponding roles, meaning you need to have permissions to create personal or public views. If you don t have the create public view role you won t have the option to make the view public. Underneath the view name there is a checkbox to make this view the default view if you re creating a public view; this means that as soon as you visit the list or library that this view will be the one seen first. Column Display and Ordering The most important decision you ll have to make in creating a view is which metadata columns to display and in what order. When you first create a view you ll have something set up by default similar to the screenshot below (it will vary based on your list or library template). All of the standard columns and your custom ones are present for display. While I won t go through all the possible columns you can choose to display, SharePoint displays a helpful parenthetical description if there is a difference between how a column displays (the Name column is one that varies in its display). The second thing you will need to choose is position from left which should ve been titled Column Order, but regardless it is
meant to give you control in how columns are read from left to left by specifying a numerical value. For instance, if you would want the Name column before the Type column, then in the above screenshot you would change the position value in the Name column to a number lower than the Type. Sorting The last option we will look at in this post is the sorting capability. Sorting in views is allowed on two columns and two columns only out-of-the-box. You would choose which column you want to control sorting on whether the column is textual or numeric. You then have to choose whether column is sorted in ascending or descending order. While not something you have to do, in views that are sorted I like to keep those columns further to the left so it is more apparent to the user how it s being sorted. It s unfortunate, but SharePoint doesn t automatically add an indicator on the columns being sorted (although it does if you initiate in a sort on the view headers). The last option sort only by specified criteria is really only for folders. By default, SharePoint will put folders regardless of your other sort criteria at the top of a view. If you want the folder to be subject to the sort you re specifying then turn on this option.
Working with SharePoint Views - Part Four We continue to move down our options for creating SharePoint views. Last time, we showed you the first three sections, and now will show three more. There will be one more post after this one to conclude the generic view options. Filtering Views The next section helps us to set which items will be shown in the view. Filtering, as well as pagination (which we ll cover later), is important to load subsets of data instead of attempting to load everything which could tax SharePoint from a performance perspective. By default, all items are shown, but by toggling the Show items only when the following is true radio button you can set filters. The first thing you can have to set it which metadata column you want to filter on. If you have a large number of items in your list/library it s a good practice to set your filter on an indexed column (you can set columns as indexed in the list/library settings under Indexed Columns ). Once you choose your column you will then choose the comparison operation for the filter. Even though there are several options, usually there will be only a few pertinent to your type of column data. For instance, is greater than or is less than are much more pertinent on numerical values than text ones. After choosing your comparison you will specify the value to look at in the free text box. Make sure that it is formatted correctly according to the type of column you re filter on! You can use special values such as [Today] for looking at date values or [Me] when looking at created/modified by columns. You can leave it at one value to filter on, or you can choose multiple. To choose more than one you ll need to choose a radio button on whether you want the filtering will match both or only one of your filtering criteria. If you want to specify multiple criteria and have the filter meet all three, then you would stick with the And radio button.
However, if you simply want the filter to match one of your criteria than use the Or radio button. You can then choose to add more comparisons by clicking Show More Columns Inline Editing SharePoint 2010 added the ability to edit items in an inline style. While it might not be super robust, it is a nice addition. Below is a screenshot of the checkbox you have to turn on inline editing for the view. Once you have it turned on, when you hover over items in a view you ll get an additional button to edit the metadata inline. When you initiate inline editing, the columns that you are allowed to edit in the fashion show as editable. After making your changes you can save by clicking the (dated) floppy disk icon, or you can discard your changes with the X icon. Tabular View The next option is the tabular view which is a poorly named option (the view is already tabular). This feature is also new to SharePoint 2010, and what is really allows you to do is multi-select items. This allows you to do a few options like check-in/out and delete. The ribbon unfortunately turns mostly inactive when doing a multi-select, but hopefully this will expand in the next version of SharePoint. To turn on this capability check the checkbox to Allow individual item checkboxes. After turning this on, you will then be able to multi-select items in your list or library.
Working with SharePoint Views - Part Five Now we move into our next set of default view options. With this post and one more we will finish all of the default options. We will then follow up with some advanced view editing in SharePoint designer and round out the series with my tips for working with views. In this post we will cover the grouping, totals and view styles. Grouping While I talked about the downsides of folders in the first post, I couldn t have been so strong on moving away from them if there wasn t a mechanism to group them logically. SharePoint provides a different way to group content together by using the expand/collapse interaction similar to tree views available also in SharePoint. When you edit the view you will see the following settings under Group By : You can only group by two columns which will give you a nested grouping. When you do group by a column you have your choice of ascending or descending display based on the metadata value you ve chose to group on. You can also choose whether, on load, the view will show everything expanded or collapsed, and the last option you have is to limit the amount of groupings used in a single page. Below is what a grouping looks like when expanded (also notice the number of items in the group is a parenthesis after the grouping value). Totals Totals are a way to run mathematical operations on column data. Although the functionality sounds enticing, it actually leaves much to be desired. However, it still is a good addition for some basic math values. Here are the most options options you can get. All these operations show, because the column I m doing a total on is a number column. Some columns, like text columns, only allow the count operation which gives the number of items. Date columns give average, maximum and minimum in addition to count. The number column gives you the last three: included is a standard deviation,
sum and variance. Note that many people are disappointed to learn that totals cannot be used on calculated columns. When you turn on totals for a column, you get an additional row below your column names and the actual data. Here we ve turned on the count operation on a person field, and I ve added a number field to show a sum operation. Style Style is a way to change up the actual display of your view in varying degrees. What we ve been looking at so far has all been the default style, but there are other options. Basic Table Document Details Newsletter Newsletter, no lines Shaded Preview Pane The most drastic changes are in the Preview Pane (which isn t a preview per se of the document but just shows the metadata on hover of the document name) and the Document Details which box the items and display metadata vertically. Below is an image containing all the styles for reference. (Notice that several remove individual item checkboxes and inline editing capability even if you have it turned on.) Jennifer Mason has also added a post about the view styles to the Office 365 blog. Notice how the examples she demonstrates use far more columns which make the style change more apparent.
Working with SharePoint Views - Part Six Congratulations if you ve been with us this far. This is the last post on default options in SharePoint views. After this we will talk about some advanced view editing in SharePoint Designer and round everything out with some of my power user tips for working with views. Folders This option is what really gives the ability for an end user to consume information with or without folder hierarchies. With this you could conceivably tow the line between familiarity and the better approach without nested folders. There is a simple radio button that allows you to turn on or off folders. Turning off folders turn on a flat design which just lists documents (unless you add grouping). Item Limit Next we have an option about how many items that are returned in a view. You choose the number of items to display. By default this is set to 30, but you can raise or lower it. After setting the number you want return in the view you have the decision whether you want the view to paginate through the remaining results, or you can only return the specified amount in the input box above. So if you set it to 30 and choose the second radio button that everything over 30 will not show up in the option. This option is most useful when creating views for web parts, because all other times you re going to want to usually paginate through the remaining items. Keep in mind that there is a value set by administrators that sets how many can actually be returned in a view that overrides any value you might set here (for performance reasons). If you paginate you get the following interface that allows you to move through the other items. Mobile The last option concerns mobile displays. Let s face it, the default mobile interface in every version of SharePoint is underwhelming to say the least. Regardless, you can choose how the view you re creating or editing will work in a mobile context.
The first checkbox allows you to choose whether the view is even available for mobile access, and the second option allows you to choose whether the view is the default view for mobile access. Both of these are only available for public and not personal views. Next you can have an option similar to the item limit option above but for a mobile context. This will most likely be smaller that the number you show above due to the context the user is accessing information. The last select option is which column to show in the view. This makes sense that you would only want to show one column due to the size of the mobile interface, and this select button allows you to choose that column. Unless it really is only numbers or a text listing you ll choose a column like Name that allows a hyperlink to the item or document.
Working with SharePoint Views - Part Seven Now that we have finally completed a review of all of the view options available inside the SharePoint interface, it would be good to go over how SharePoint Designer can improve the way we work with views in SharePoint. Since SharePoint Designer is now free there is no reason not to explore what the program can do for (as long as your organization allows its use). All views in SharePoint are really list view web parts that are formatted in different ways. Taking a look at the code for your view in SharePoint Designer will reveal XML, XSLT and CAML. Even though all of these topics are beyond the scope of this post, I can at least show you some quick changes you can make to your views using SharePoint Designer. Default Options in Designer If you remember all the options we ve covered in the previous posts you ll be delighted to know that most of those options can also be set inside SharePoint Designer. First, to open the view in SharePoint Designer you can go to Site Actions Edit Site in SharePoint Designer to open the site in Designer. After doing so you ll see an All Files button in the left pane that will show you all of your lists and libraries. After clicking on the list/library you wish to open you ll be presented with all your views. Right-click on your view and check out, and then open the file. Once the view is open you ll see in the ribbon many options that directly relate to what we saw in the SharePoint interface. Adding Hyperlink to Title Field Now let s look at some modifications we can make to our view. Unfortunately, by default we cannot hyperlink the title field which comes by default on all items and documents in SharePoint. The only hyperlinks to the actual item come from using the name field, but often times the name field isn t the one we want to use. While in a list view we can t directly link to a document or item (at least from what I ve found), we can at least link to a details page about the document or item that would allow the retrieval of the document or item (if you do use a data view web part you can directly hyperlink the title field to a document or item however). First, we need to add the title field to the view. To do this click the Add/Remove Columns button in the ribbon.highlight the Title field on the left and click Add to move it over (I also decided to remove the Name column in this interface to remove confusion).
After adding the field we can hover over the field in the design view and get a context menu. Clicking thearrow will allow you to click a checkbox that adds a link to the item (you can also add hyperlinks by right-clicking on the column and using the context menu to add it). When you save and look at the view in the browser the title field is hyperlinked to a detail view of the document. Conditional Formatting Our discussion wouldn t be complete without looking at some of the operations we can run on items in our view. One of the most popular is conditional formatting. This allows to add certain styles based on values inside of columns regardless of whether the column is displayed in the view or not. There are many possible use cases for this functionality. Let s say you want to keep a simple inventory of office items and want a visual notification when a reorder is necessary; conditional formatting allows to have a visual representation of different states of our items. To start this we will select the conditional formatting icon in the ribbon and choose the Format Row option.
Then we will choose the comparison operation to use on items in our view. In this case we will use the following options to add a style if the value in the Number column is greater than or equal to 5. As you can this is a very powerful dialogue with many options to satisfy even the most complex of comparisons. Then we will click Set Style to choose our formatting option. I chose to add a row highlight to designate that our conditional formatting has been met. Now we can save the changes, check in the view and when we go back to the browser and refresh we will see our conditional formatting in action.
Working with SharePoint Views - Part Eight We have finally arrived at the eighth and final post in our SharePoint views series. Kudos if you ve tagged along for them all thus far. We have covered a wide array of functionality and practices regarding this pivotal SharePoint functionality. For the final post I will share some of the pro tips of working with views. These will hopefully help you maximize the functionality while reducing possible headaches of working with views. Let s get started. View Visibility in Folders There are two interesting features additions in SharePoint 2010 concerning folders and both share a similar interface for the setting: configuring views available at folder level and metadata inheritance from documents and items in a folder. The former one is the one we re considering, and it is titled Configure Views By Location in the SharePoint UI. There are two ways to get to this setting in the SharePoint header. This tool allows you to choose, at a folder level, which views are available to the end-user. In addition to whether it is available or not, you can also make a certain view the default one for the current folder; and you can also choose to override other settings you ve made in other folders to make the view available throughout the list or library. Use this tool if you have views that might only pertain to data within certain folders to avoid excessive views in other areas of the list or library. This is just one more tool Microsoft has provided us to work with views. Web Part Views As many of us know, views are not only contained at the list and library level. Individual web parts can have their own views. If you add a list view web part of a list or library it copies the views from the list or library into the web part when you set the view. It s done in the interface below.
None of this is new information, but how I ve learned to work with web part views is to not make changes to views inside of a web part. I ve learned the hard way where people delete web parts, and then the changes to the view are lost. The only way to recover is to recover the entire page which may overwrite other content, or go back and export the web part from a past version neither of which are a great solution. Instead, I suggest you create and edit web part views only in the list and library. This way, if the web part gets deleted then your view settings are not. I usually title the view something like Web Part View to avoid an end-user being confused trying to use it. View Naming Conventions Views are important, because as we ve discussed they allow us different insight into how content should be consumed. With the amount of options available to sort, filter and group it s important to designate to a user the reason why they should use alternative views. To increase the perceived usefulness of views it s important to think through how you re configuring and titling them as well. Let s look at the screenshot below. As you can see the titles are reflective of how the data is organized. I pass along the setting action and setting name in the view. Now the user has an understanding of the benefit of the view, and it sets a reasonable expectation to how the view will aid them in their information discovery and consumption. Clean Up URLs Another puzzling interaction in how views are created is that when you originally create a view you can name a view but not specify a URL. However, after you create the view you can go in an specify the URL for the view apart from the title. With this you can make shorter and more comprehensible URLs. You can make the following change: Forms/Grouped%20By%20Department.aspx» Forms/GroupByDept.aspx
Be Aware of the Mobile Context The disciplines of content strategy and interaction design have been turned upside down by the rise of mobile devices and their specific needs. We should also keep this in mind when thinking about views. By default, when you create a new view it automatically adds it as a mobile view, but this might not be the best decision for your mobile users. While 10 views might be reasonable on a desktop computer, a mobile user using a smaller device in a different context might view a decision like that as laborious. It s best to keep this in mind and limit the settings we use for views and also the number of views a mobile user has to decide between. Here is the interface for deciding between views in ios (iphone/ipod touch). Conclusion Thank you for riding along this eight part series on SharePoint views. I hope it encourages you to fully use all of the functionality provided in SharePoint to maximize your investment in the platform as well as increase adoption. Now get out there and make some great SharePoint views!